Weaver Xtreme Theme Support - Version 4.9.2

Version Description

  • Added: Delete V5 Beta data and files
Download this release

Release Info

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

Code changes from version 4.4.5 to 4.9.2

admin/admin-advancedopts.php CHANGED
@@ -1,4 +1,6 @@
1
  <?php
 
 
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  } // Exit if accessed directly
@@ -8,16 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
8
  */
9
 
10
  function weaverx_admin_advancedopts() {
11
-
12
- if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
13
- if ( function_exists( 'weaverx_5_admin_advancedopts' ) ) {
14
- weaverx_5_admin_advancedopts( true );
15
- } else {
16
- echo '<p>' . __( 'Legacy Interface No Longer Supported', 'weaver-xtreme' );
17
- }
18
- } else {
19
- require_once( dirname( __FILE__ ) . '/admin-advancedopts4.php' );
20
- weaverx_admin_advancedopts4(); // Legacy version
21
- }
22
  }
23
 
1
  <?php
2
+ /** @noinspection PhpUndefinedConstantInspection */
3
+
4
  if ( ! defined( 'ABSPATH' ) ) {
5
  exit;
6
  } // Exit if accessed directly
10
  */
11
 
12
  function weaverx_admin_advancedopts() {
13
+ require_once( dirname( __FILE__ ) . '/admin-advancedopts4.php' );
14
+ weaverx_admin_advancedopts4(); // Legacy version
 
 
 
 
 
 
 
 
 
15
  }
16
 
admin/admin-advancedopts4.php CHANGED
@@ -18,6 +18,9 @@ function weaverx_admin_advancedopts4() {
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>
@@ -45,6 +48,14 @@ function weaverx_admin_advancedopts4() {
45
  <?php weaverx_adv_site_opts(); ?>
46
  </div> <!-- site options -->
47
 
 
 
 
 
 
 
 
 
48
 
49
  <!-- ***************************************************** -->
50
 
@@ -358,6 +369,40 @@ See the <strong>Settings &rarr; Discussion</strong> admin page for avatar settin
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>
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
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
22
+ weaverx_elink( '#asptabnew', __( 'New Weaver Xtreme V5 Options', 'weaver-xtreme' /*adm*/ ), __( 'New Options', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
23
+ }
24
  weaverx_elink( '#asp_tab_admin', __( 'Basic Administrative Options', 'weaver-xtreme' /*adm*/ ), __( 'Admin Options', 'weaver-xtreme' /*adm*/ ), '<li>', '</li>' );
25
  ?>
26
  </ul>
48
  <?php weaverx_adv_site_opts(); ?>
49
  </div> <!-- site options -->
50
 
51
+ <!-- ***************************************************** -->
52
+ <?php if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
53
+ echo '<div id="asptabnew" class="tab_adv">';
54
+ weaverx_adv_new_opts();
55
+ echo "</div> <!-- new options -->\n";
56
+ } ?>
57
+
58
+
59
 
60
  <!-- ***************************************************** -->
61
 
369
  }
370
 
371
 
372
+ // ============================================== SITE OPTIONS ===========================================
373
+
374
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
375
+ function weaverx_adv_new_opts() {
376
+ ?>
377
+ <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-generic"></span>
378
+ <?php _e( 'New Version 5 Options', 'weaver-xtreme' /*adm*/ ); ?>
379
+ </div><br/>
380
+ <?php _e( 'This is a list of new options added to Weaver Xtreme Version 5 that are NOT supported by the Legacy interface. You will have to use the Customizer to use any of these options.', 'weaver-xtreme' ); ?>
381
+ <br/>
382
+ <hr/>
383
+ <!-- ======== -->
384
+ <h3>
385
+ <?php _e( 'Following new V5 options available only from the Customizer.', 'weaver-xtreme' ); ?>
386
+ </h3>
387
+ <ul>
388
+ <li>
389
+ <?php _e( 'Font settings for text transform, character spacing, and word spacing.', 'weaver-xtreme' ); ?>
390
+ </li>
391
+ <li>
392
+ <?php _e( 'Header and Footer Area replacement page/posts for Siteorigin and Elementor.', 'weaver-xtreme' ); ?>
393
+ </li>
394
+ <li>
395
+ <?php _e( 'Top and Bottom margins for Block Editor elements.', 'weaver-xtreme' ); ?>
396
+ </li>
397
+ </ul>
398
+
399
+ <?php
400
+ do_action( 'weaverxplus_admin', 'site_opts' );
401
+ do_action( 'weaverx_child_siteoptions' );
402
+ }
403
+ }
404
+
405
+
406
  function weaverx_admin_admin_ts() {
407
  ?>
408
  <div class="atw-option-header"><span style="color:black; padding:.2em;" class="dashicons dashicons-admin-generic"></span>
admin/admin-lib-ts-2.php CHANGED
@@ -504,6 +504,15 @@ function weaverx_form_widget_area( $value, $submit = false ) {
504
  'info' => $info,
505
  'value' => array(),
506
  ), 'px' );
 
 
 
 
 
 
 
 
 
507
  }
508
 
509
  if ( in_array( $id, array( 'container', 'header', 'footer' ) ) ) {
@@ -645,7 +654,7 @@ function weaverx_form_menu_opts( $value, $submit = false ) {
645
 
646
 
647
  if ( $wp_logo ) {
648
- $wp_logo_html = "<img src='{$wp_logo}' style='max-height:16px;margin-left:10px;' />";
649
  } else {
650
  $wp_logo_html = __( 'Not set', 'weaver-xtreme' );
651
  }
@@ -1104,6 +1113,13 @@ weaverx_form_font_bold_italic( array( 'id' => $id_italic ) );
1104
  } ?>
1105
  </td>
1106
  </tr>
 
 
 
 
 
 
 
1107
  <?php
1108
 
1109
  }
@@ -1132,24 +1148,61 @@ function weaverx_from_fi_location( $value, $is_post = false ) {
1132
 
1133
 
1134
  function weaverx_form_align( $value ) {
1135
- if ( $value['id'] == 'wrapper_align' ) {
1136
- $value['value'] = array(
1137
- array( 'val' => 'align-center', 'desc' => __( 'Center', 'weaver-xtreme' /*adm*/ ) ),
1138
- array( 'val' => 'float-left', 'desc' => __( 'Align Left', 'weaver-xtreme' /*adm*/ ) ),
1139
- array( 'val' => 'float-right', 'desc' => __( 'Align Right', 'weaver-xtreme' /*adm*/ ) ),
1140
- array( 'val' => 'alignnone', 'desc' => __( 'No Alignment', 'weaver-xtreme' /*adm*/ ) ),
1141
- array( 'val' => 'alignwide', 'desc' => __( 'Align Wide', 'weaver-xtreme' /*adm*/ ) ),
1142
- array( 'val' => 'alignfull', 'desc' => __( 'Align Full', 'weaver-xtreme' /*adm*/ ) ),
1143
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1144
  } else {
1145
- $value['value'] = array(
1146
- array( 'val' => 'float-left', 'desc' => __( 'Align Left', 'weaver-xtreme' /*adm*/ ) ),
1147
- array( 'val' => 'align-center', 'desc' => __( 'Center', 'weaver-xtreme' /*adm*/ ) ),
1148
- array( 'val' => 'float-right', 'desc' => __( 'Align Right', 'weaver-xtreme' /*adm*/ ) ),
1149
- array( 'val' => 'alignnone', 'desc' => __( 'No Alignment', 'weaver-xtreme' /*adm*/ ) ),
1150
- array( 'val' => 'alignwide', 'desc' => __( 'Align Wide', 'weaver-xtreme' /*adm*/ ) ),
1151
- array( 'val' => 'alignfull', 'desc' => __( 'Align Full', 'weaver-xtreme' /*adm*/ ) ),
1152
- );
 
 
 
 
 
 
 
 
 
 
 
1153
  }
1154
 
1155
  weaverx_form_select_id( $value );
504
  'info' => $info,
505
  'value' => array(),
506
  ), 'px' );
507
+
508
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
509
+ weaverx_form_checkbox( array(
510
+ 'name' => '<span class="i-left dashicons dashicons-align-none"></span><small>' . __( 'Use "Lazy H" Layout', 'weaver-xtreme' ) . '</small>',
511
+ 'id' => 'lazyh',
512
+ 'type' => '',
513
+ 'info' => __( 'Add styling to support "Lazy H" layout: wide Header and Footer, indented Content. (Like a sideways H.) You will also need to add fullwidth alignment to the header and footer to get this layout. Option added for backward compatibility with previous versions of Weaver Xtreme.', 'weaver-xtreme' ),
514
+ ) );
515
+ }
516
  }
517
 
518
  if ( in_array( $id, array( 'container', 'header', 'footer' ) ) ) {
654
 
655
 
656
  if ( $wp_logo ) {
657
+ $wp_logo_html = "<img src='{$wp_logo}' alt='logo' style='max-height:16px;margin-left:10px;' />";
658
  } else {
659
  $wp_logo_html = __( 'Not set', 'weaver-xtreme' );
660
  }
1113
  } ?>
1114
  </td>
1115
  </tr>
1116
+ <tr><td>&nbsp;</td><td>&nbsp;</td><td><small><em>
1117
+ <?php
1118
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
1119
+ echo __( 'You can set Text Transform, Character and Word Spacing in the Customizer.', 'weaver-xtreme' );
1120
+ }
1121
+ ?>
1122
+ </em></small></td></tr>
1123
  <?php
1124
 
1125
  }
1148
 
1149
 
1150
  function weaverx_form_align( $value ) {
1151
+ $all = array('header_image_align', 'wrapper_align', 'container_align',
1152
+ 'header_align', 'header_sb_align', 'header_html_align',
1153
+ 'footer_align', 'footer_sb_align', 'footer_html_align',
1154
+ 'infobar_align', 'top_align', 'bottom_align'
 
 
 
 
1155
  );
1156
+
1157
+ // sorry - this is really stupid, but the order of these determines the default value which needs
1158
+ // to be align-center for wrapper.
1159
+
1160
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) &&
1161
+ in_array( $value['id'], $all) ) {
1162
+ if ( $value['id'] == 'wrapper_align') {
1163
+ $value['value'] = array(
1164
+ array( 'val' => 'align-center', 'desc' => __( 'Center', 'weaver-xtreme' /*adm*/ ) ),
1165
+ array( 'val' => 'float-left', 'desc' => __( 'Align Left', 'weaver-xtreme' /*adm*/ ) ),
1166
+ array( 'val' => 'float-right', 'desc' => __( 'Align Right', 'weaver-xtreme' /*adm*/ ) ),
1167
+ array( 'val' => 'alignnone', 'desc' => __( 'No Alignment', 'weaver-xtreme' /*adm*/ ) ),
1168
+ array( 'val' => 'alignwide', 'desc' => __( 'Align Wide', 'weaver-xtreme' /*adm*/ ) ),
1169
+ array( 'val' => 'alignfull', 'desc' => __( 'Align Full', 'weaver-xtreme' /*adm*/ ) ),
1170
+ array( 'val' => 'wvrx-fullwidth', 'desc' => esc_html__( 'Extend BG to Full width', 'weaver-xtreme' ) ),
1171
+ array( 'val' => 'wvrx-expand-full', 'desc' => esc_html__( 'Stretch Full width', 'weaver-xtreme' ) ),
1172
+ );
1173
+ } else {
1174
+ $value['value'] = array(
1175
+ array( 'val' => 'float-left', 'desc' => __( 'Align Left', 'weaver-xtreme' /*adm*/ ) ),
1176
+ array( 'val' => 'align-center', 'desc' => __( 'Center', 'weaver-xtreme' /*adm*/ ) ),
1177
+ array( 'val' => 'float-right', 'desc' => __( 'Align Right', 'weaver-xtreme' /*adm*/ ) ),
1178
+ array( 'val' => 'alignnone', 'desc' => __( 'No Alignment', 'weaver-xtreme' /*adm*/ ) ),
1179
+ array( 'val' => 'alignwide', 'desc' => __( 'Align Wide', 'weaver-xtreme' /*adm*/ ) ),
1180
+ array( 'val' => 'alignfull', 'desc' => __( 'Align Full', 'weaver-xtreme' /*adm*/ ) ),
1181
+ array( 'val' => 'wvrx-fullwidth', 'desc' => esc_html__( 'Extend BG to Full width', 'weaver-xtreme' ) ),
1182
+ array( 'val' => 'wvrx-expand-full', 'desc' => esc_html__( 'Stretch Full width', 'weaver-xtreme' ) ),
1183
+ );
1184
+ }
1185
+
1186
  } else {
1187
+ if ( $value['id'] == 'wrapper_align') {
1188
+ $value['value'] = array(
1189
+ array( 'val' => 'align-center', 'desc' => __( 'Center', 'weaver-xtreme' /*adm*/ ) ),
1190
+ array( 'val' => 'float-right', 'desc' => __( 'Align Right', 'weaver-xtreme' /*adm*/ ) ),
1191
+ array( 'val' => 'float-left', 'desc' => __( 'Align Left', 'weaver-xtreme' /*adm*/ ) ),
1192
+ array( 'val' => 'alignnone', 'desc' => __( 'No Alignment', 'weaver-xtreme' /*adm*/ ) ),
1193
+ array( 'val' => 'alignwide', 'desc' => __( 'Align Wide', 'weaver-xtreme' /*adm*/ ) ),
1194
+ array( 'val' => 'alignfull', 'desc' => __( 'Align Full', 'weaver-xtreme' /*adm*/ ) ),
1195
+ );
1196
+ } else {
1197
+ $value['value'] = array(
1198
+ array( 'val' => 'float-left', 'desc' => __( 'Align Left', 'weaver-xtreme' /*adm*/ ) ),
1199
+ array( 'val' => 'align-center', 'desc' => __( 'Center', 'weaver-xtreme' /*adm*/ ) ),
1200
+ array( 'val' => 'float-right', 'desc' => __( 'Align Right', 'weaver-xtreme' /*adm*/ ) ),
1201
+ array( 'val' => 'alignnone', 'desc' => __( 'No Alignment', 'weaver-xtreme' /*adm*/ ) ),
1202
+ array( 'val' => 'alignwide', 'desc' => __( 'Align Wide', 'weaver-xtreme' /*adm*/ ) ),
1203
+ array( 'val' => 'alignfull', 'desc' => __( 'Align Full', 'weaver-xtreme' /*adm*/ ) ),
1204
+ );
1205
+ }
1206
  }
1207
 
1208
  weaverx_form_select_id( $value );
admin/admin-lib-ts.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  // files needed to be loaded before any ts lib sapi interface actions
3
  //
4
  function weaverx_process_options_themes() {
@@ -42,13 +43,26 @@ function weaverx_process_options_themes() {
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 );
@@ -66,7 +80,7 @@ function weaverx_process_options_themes() {
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' );
@@ -145,7 +159,7 @@ function weaverx_activate_subtheme( $theme ) {
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
@@ -783,7 +797,8 @@ function weaverx_ex_set_current_to_serialized_values( $contents ) {
783
  $new_cache[ $key ] = $val;
784
  } // keep
785
  }
786
- $opts = $restore['weaverx_base']; // fetch base opts
 
787
 
788
  weaverx_delete_all_options();
789
 
@@ -796,10 +811,17 @@ function weaverx_ex_set_current_to_serialized_values( $contents ) {
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
  }
@@ -815,6 +837,14 @@ function weaverx_ex_set_current_to_serialized_values( $contents ) {
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' ) ) {
1
  <?php
2
+ /** @noinspection PhpMissingReturnTypeInspection */
3
  // files needed to be loaded before any ts lib sapi interface actions
4
  //
5
  function weaverx_process_options_themes() {
43
  $saved = get_option( apply_filters( 'weaverx_options', 'weaverx_settings_backup' ), array() );
44
  if ( ! empty( $saved ) ) {
45
  $weaverx_opts_cache = $saved;
46
+ weaverx_wpupdate_option( WEAVER_SETTINGS_NAME, $weaverx_opts_cache );
47
  }
48
  weaverx_save_msg( __( "Current settings restored from WordPress database.", 'weaver-xtreme' /*adm*/ ) );
49
 
50
  return true;
51
  }
52
 
53
+ if ( weaverx_submitted( 'remove_v5_settings' ) ) { // invoked from Save/Restore tab
54
+ // unlink css files for editor
55
+ $save_dir = weaverx_f_uploads_base_dir() . '/weaverx5-subthemes';
56
+ @unlink ($save_dir . '/style-weaverxt.css');
57
+ @unlink ($save_dir . '/block-editor-style-wvrx.css');
58
+ @unlink ($save_dir . '/editor-early-style-wvrx.css');
59
+ @rmdir( $save_dir );
60
+ delete_option( 'weaverx5_settings' );
61
+ weaverx_save_msg( __( "Weaver Xtreme 5 Beta settings and style files deleted.", 'weaver-xtreme' /*adm*/ ) );
62
+
63
+ return true;
64
+ }
65
+
66
  if ( weaverx_submitted( 'hide_thumbs' ) ) {
67
  $hide = weaverx_getopt( '_hide_theme_thumbs' );
68
  weaverx_setopt( '_hide_theme_thumbs', ! $hide );
80
  }
81
  // delete everything!
82
  weaverx_save_msg( __( 'All Weaver Xtreme settings have been reset to the defaults.', 'weaver-xtreme' ) );
83
+ delete_option( apply_filters( 'weaverx_options', WEAVER_SETTINGS_NAME ) );
84
  global $weaverx_opts_cache;
85
  $weaverx_opts_cache = false; // clear the cache
86
  weaverx_init_opts( 'reset_weaverx' );
159
  }
160
  }
161
 
162
+ $opts = weaverx_ts_convert4_to_5( $restore['weaverx_base'], true ); // base opts
163
  weaverx_delete_all_options();
164
 
165
  foreach ( $new_cache as $key => $val ) { // set the values we need to keep
797
  $new_cache[ $key ] = $val;
798
  } // keep
799
  }
800
+
801
+ $opts = weaverx_ts_convert4_to_5( $restore['weaverx_base'], true ); // base opts
802
 
803
  weaverx_delete_all_options();
804
 
811
  foreach ( $new_cache as $key => $val ) { // set the values we need to keep
812
  weaverx_setopt( $key, $val, false );
813
  }
814
+
815
+ if ( weaverx_getopt('lazyh') ) {
816
+ weaverx_alert_debug('lazy h true, header_align=' . weaverx_getopt('header_align'));
817
+ weaverx_setopt('UPDATEUPDATEUPDATE','test');
818
+ }
819
+
820
  } elseif ( $type == 'backup' ) {
821
  weaverx_delete_all_options();
822
 
823
+ $opts = weaverx_ts_convert4_to_5( $restore['weaverx_base'], true ); // fetch base opts
824
+
825
  foreach ( $opts as $key => $val ) {
826
  weaverx_setopt( $key, $val, false ); // overwrite with saved values
827
  }
837
  return true;
838
  }
839
 
840
+ function weaverx_ts_convert4_to_5( $options ) {
841
+ if (function_exists( 'weaverx_convert4_to_5' ) ) {
842
+ return weaverx_convert4_to_5( $options );
843
+ } else {
844
+ return $options; // running V4
845
+ }
846
+ }
847
+
848
  // Weaver Xtreme 5 compatibility functions
849
  if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
850
  if ( ! function_exists( 'weaverx_esc_textarea' ) ) {
admin/admin-mainopts.php CHANGED
@@ -10,22 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
10
 
11
  // ======================== Main Options > Top Level ========================
12
  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
- if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' )) {
18
- if ( function_exists( 'weaverx_5_admin_mainopts' ) ) {
19
- weaverx_5_admin_mainopts( true );
20
- } else {
21
- echo '<h3>';
22
- echo __( 'Weaver Xtreme Main Options', 'weaver-xtreme' );
23
- echo '</h3>';
24
- echo '<p>' . __( 'Legacy Interface No Longer Supported', 'weaver-xtreme' );
25
- }
26
- } else {
27
  require_once( dirname( __FILE__ ) . '/admin-mainopts4.php' );
28
  weaverx_admin_mainopts4();
29
- }
30
-
31
  }
10
 
11
  // ======================== Main Options > Top Level ========================
12
  function weaverx_admin_mainopts() {
 
 
 
13
 
 
 
 
 
 
 
 
 
 
 
14
  require_once( dirname( __FILE__ ) . '/admin-mainopts4.php' );
15
  weaverx_admin_mainopts4();
 
 
16
  }
admin/admin-mainopts4.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  } // Exit if accessed directly
@@ -351,141 +352,162 @@ function weaverx_mainopts_custom() {
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' ) ),
@@ -507,13 +529,22 @@ function weaverx_mainopts_fullwidth() {
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 ========================
@@ -522,7 +553,7 @@ function weaverx_mainopts_header() {
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
  }
@@ -560,6 +591,25 @@ function weaverx_mainopts_header() {
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(
@@ -2247,6 +2297,21 @@ function weaverx_mainopts_footer() {
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(
1
  <?php
2
+ /** @noinspection PhpMissingReturnTypeInspection */
3
  if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  } // Exit if accessed directly
352
 
353
  function weaverx_mainopts_fullwidth() {
354
 
355
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
356
+ $opts = array(
357
+ array( 'type' => 'submit' ),
358
+ array(
359
+ 'name' => __( 'Full Width Site', 'weaver-xtreme' /*adm*/ ),
360
+ 'id' => '-editor-justify',
361
+ 'type' => 'header',
362
+ 'info' => __( 'One-Step Site Layout, Extend, and Stretch options are no longer supported in Weaver Xtreme V5. You can use Full and Wide alignment to achieve similar results. If you used Extend or Stretch settings, they will be automatically converted to equivalent settings when you load your settings.', 'weaver-xtreme' /*adm*/ ),
363
+ ),
364
+ );
365
+ } else {
366
+ $opts = array(
367
+ array( 'type' => 'submit' ),
368
+ array(
369
+ 'name' => __( 'Full Width Site', 'weaver-xtreme' /*adm*/ ),
370
+ 'id' => '-editor-justify',
371
+ 'type' => 'header',
372
+ 'info' => __( 'Options to easily create full width site designs', 'weaver-xtreme' /*adm*/ ),
373
+ 'help' => 'help.html#FullWidth',
374
+ ),
375
 
376
 
377
+ array(
378
+ 'name' => __( 'One-Step Site Layout', 'weaver-xtreme' /*adm*/ ),
379
+ 'id' => 'site_layout',
380
+ 'type' => 'select_id',
381
+ '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*/ ),
382
+ 'value' => array(
383
+ array( 'val' => '', 'desc' => '' ),
384
+ array( 'val' => 'fullwidth', 'desc' => __( 'Full Width - Extends BG to full width', 'weaver-xtreme' ) ),
385
+ array( 'val' => 'stretched', 'desc' => __( 'Stretched - Expand to full width', 'weaver-xtreme' ) ),
386
+ array( 'val' => 'custom', 'desc' => __( 'Traditional - Use Traditional Width Options', 'weaver-xtreme' ) ),
387
+ ),
388
  ),
389
+ );
390
+ }
391
 
392
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '<' ) ) {
393
+ $opts[] = array(
394
+ 'name' => __( 'Wide and Full Alignment', 'weaver-xtreme' /*adm*/ ),
395
+ 'id' => '-admin-appearance3',
396
+ 'type' => 'header_area',
397
+ '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*/ ),
398
+ );
399
+ }
400
 
 
 
 
 
 
 
401
  $opts[] = array(
402
  'name' => '<small>' . __( 'Align Full and Wide', 'weaver-xtreme' /*adm*/ ) . '</small>',
403
  'type' => 'note',
404
  '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*/ ),
405
  );
406
 
407
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
408
 
409
+ $opts[] = array(
410
+ 'name' => __( 'Extend BG Color', 'weaver-xtreme' /*adm*/ ),
411
+ 'id' => '-admin-appearance',
412
+ 'type' => 'header_area',
413
+ 'info' => __( 'These options were first added to Weaver Xtreme many years ago, and were a "state-of-the-art" technique at the time to achieve full-width layouts. This technique has now been largely replaced by Align options. However, these old options do allow designs to use different colors for possibly interesting effects. However, there are many ways to achieve similar results, and so these options will be REMOVED from future versions of Weaver Xtreme. For now, we strongly urge you to not use these options on new sites, and to convert any use on old sites to new design. When these options are eventually dropped, they will be automatically converted to the Extend BG Attributes alignment. (&starf;Plus)', 'weaver-xtreme' /*adm*/ ),
414
+ );
415
+ } else {
416
+ $opts[] = array(
417
+ 'name' => __( 'Extend BG Attributes to Full Width', 'weaver-xtreme' /*adm*/ ),
418
+ 'id' => '-editor-code',
419
+ 'type' => 'header_area',
420
+ '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*/ ),
421
+ );
422
 
423
 
424
+ $extend = array(
425
+ 'container' => array( __( 'Container Area Extend BG', 'weaver-xtreme' ), __( 'Extend Container Area BG Attributes to full width.', 'weaver-xtreme' ) ),
426
+ 'header' => array( __( 'Header Area Extend BG', 'weaver-xtreme' ), __( ' Extend Header Area BG Attributes to full width.', 'weaver-xtreme' ) ),
427
+ 'header_sb' => array( __( 'Header Widget Area Extend BG', 'weaver-xtreme' ), __( 'Extend Header Widget Area BG Attributes to full width.', 'weaver-xtreme' ) ),
428
+ 'header_html' => array( __( 'Header HTML Area Extend BG', 'weaver-xtreme' ), __( 'Extend Header HTML Area BG Attributes to full width.', 'weaver-xtreme' ) ),
429
+ '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' ) ),
430
+ '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' ) ),
431
+ 'infobar' => array( __( 'Info Bar Extend BG', 'weaver-xtreme' ), __( 'Extend Info Bar BG Attributes to full width.', 'weaver-xtreme' ) ),
432
+ //'content' => array( __('Content Area Fullwidth BG', 'weaver-xtreme'), __('Extend Content Area BG Attributes to full width.','weaver-xtreme' )),
433
+ 'post' => array( __( 'Post Area Extend BG', 'weaver-xtreme' ), __( 'Extend each Post Area BG Attributes to full width.', 'weaver-xtreme' ) ),
434
+ 'footer' => array( __( 'Footer Area Extend BG', 'weaver-xtreme' ), __( 'Extend Footer Area BG Attributes to full width.', 'weaver-xtreme' ) ),
435
+ 'footer_sb' => array( __( 'Footer Widget Area Extend BG', 'weaver-xtreme' ), __( 'Extend Footer Widget Area BG Attributes to full width.', 'weaver-xtreme' ) ),
436
+ 'footer_html' => array( __( 'Footer HTML Area Extend BG', 'weaver-xtreme' ), __( 'Extend Footer HTML Area BG Attributes to full width.', 'weaver-xtreme' ) ),
437
 
438
+ );
439
 
440
+ foreach ( $extend as $id => $vals ) {
441
+ $type = 'checkbox';
442
+ if ( $id == 'm_extra' ) {
443
+ $type = '+checkbox';
444
+ }
445
+ $opts[] = array(
446
+ 'name' => '<span class="i-left" style="font-size:150%;">&harr;</span><small>' . $vals[0],
447
+ 'id' => $id . '_extend_width',
448
+ 'type' => $type,
449
+ 'info' => $vals[1],
450
+ );
451
  }
452
+
453
+
454
  $opts[] = array(
455
+ 'name' => __( 'Stretch Areas (Expand)', 'weaver-xtreme' /*adm*/ ),
456
+ 'id' => '-editor-expand',
457
+ 'type' => 'header_area',
458
+ '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*/ ),
459
+ );
460
+ $opts[] = array(
461
+ 'name' => '<small>' . __( 'These Options OBSOLETE', 'weaver-xtreme' /*adm*/ ) . '</small>',
462
+ 'type' => 'note',
463
+ '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*/ ),
464
  );
 
 
465
 
466
+ $opts[] = array(
467
+ 'name' => '<span class="i-left dashicons dashicons-editor-expand"></span>' . __( 'Entire Site Full Width', 'weaver-xtreme' /*adm*/ ),
468
+ 'id' => 'wrapper_fullwidth',
469
+ 'type' => 'checkbox',
470
+ '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*/ ),
471
+ );
 
 
 
 
 
472
 
 
 
 
 
 
 
473
 
474
+ $stretch = array(
475
+ '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' ) ),
476
+ 'header-image' => array( __( 'Header Image Stretch', 'weaver-xtreme' ), __( 'Stretch Header Image to full width.', 'weaver-xtreme' ) ),
477
+ 'site_title' => array( __( 'Site Title/Tagline Stretch', 'weaver-xtreme' ), __( 'This option includes the Site Title, Tagline, Search Button, and MiniMenu.', 'weaver-xtreme' ) ),
478
+ 'header-widget-area' => array( __( 'Header Widget Area Stretch', 'weaver-xtreme' ), __( 'Stretch Header Widget Area to full width.', 'weaver-xtreme' ) ),
479
+ 'header-html' => array( __( 'Header HTML Area Stretch', 'weaver-xtreme' ), __( 'Stretch Header HTML Area to full width.', 'weaver-xtreme' ) ),
480
+ 'm_primary' => array( __( 'Primary Menu Stretch', 'weaver-xtreme' ), __( 'Stretch Primary Menu to full width.', 'weaver-xtreme' ) ),
481
+ 'm_secondary' => array( __( 'Secondary Menu Stretch', 'weaver-xtreme' ), __( 'Stretch Secondary Menu to full width.', 'weaver-xtreme' ) ),
482
+ 'container' => array( __( 'Container Area Stretch', 'weaver-xtreme' ), __( 'Stretch Container Area to full width.', 'weaver-xtreme' ) ),
483
+ 'infobar' => array( __( 'Info Bar Stretch', 'weaver-xtreme' ), __( 'Stretch Info Bar to full width.', 'weaver-xtreme' ) ),
484
+ 'post' => array( __( 'Post Area Stretch', 'weaver-xtreme' ), __( 'Stretch Post Area to full width.', 'weaver-xtreme' ) ),
485
+ 'footer' => array( __( 'Footer Area Stretch', 'weaver-xtreme' ), __( 'Checking this option will automatically include the other Footer Area Stretch options as well.', 'weaver-xtreme' ) ),
486
+ 'footer_sb' => array( __( 'Footer Widget Area Stretch', 'weaver-xtreme' ), __( 'Stretch Footer Widget Area to full width.', 'weaver-xtreme' ) ),
487
+ 'footer_html' => array( __( 'Footer HTML Area Stretch', 'weaver-xtreme' ), __( 'Stretch Footer HTML Area to full width.', 'weaver-xtreme' ) ),
488
+ 'site-ig-wrap' => array( __( 'Footer Copyright Area Stretch', 'weaver-xtreme' ), __( 'Stretch Footer Copyright Area to full width.', 'weaver-xtreme' ) ),
489
 
490
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
 
492
+ foreach ( $stretch as $id => $vals ) {
493
+ $opts[] = array(
494
+ 'name' => '<span class="i-left dashicons dashicons-editor-expand"></span>' . $vals[0],
495
+ 'id' => 'expand_' . $id,
496
+ 'type' => 'checkbox',
497
+ 'info' => $vals[1],
498
+ );
499
+ }
500
 
 
501
  $opts[] = array(
502
+ 'name' => __( 'Extend BG Color', 'weaver-xtreme' /*adm*/ ),
503
+ 'id' => '-admin-appearance',
504
+ 'type' => 'header_area',
505
+ '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*/ ),
506
  );
507
  }
508
 
509
 
 
 
 
 
 
 
 
 
510
  $extend = array(
 
511
  'header' => array( __( 'Header Area Extend BG Color', 'weaver-xtreme' ), __( 'Extend Header Area BG Color to full width.', 'weaver-xtreme' ) ),
512
  'm_primary' => array( __( 'Primary Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Primary Menu BG Color to full width.', 'weaver-xtreme' ) ),
513
  'm_secondary' => array( __( 'Secondary Menu Extend BG', 'weaver-xtreme' ), __( 'Extend Secondary Menu BG Color to full width.', 'weaver-xtreme' ) ),
529
 
530
  ?>
531
  <div class="options-intro">
532
+ <?php
533
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
534
+ _e( '<strong>OBSOLETE: Full Width:</strong> Options to create full width sites.', 'weaver-xtreme' /*adm*/ );
535
+ echo '<p>';
536
+ _e( '<strong style="color:red;">IMPORTANT NOTE:</strong> Full Width options have been replaced by Align Full or Align Wide in Weaver Xtreme V5.', 'weaver-xtreme' );
537
+
538
+ } else {
539
+
540
+ _e( '<strong>Full Width:</strong> Options to create full width sites.', 'weaver-xtreme' /*adm*/ );
541
+ echo '<p>';
542
+ _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' );
543
+ } ?>
544
+
545
  </p></div>
546
  <?php
547
  weaverx_form_show_options( $opts );
 
 
548
  }
549
 
550
  // ======================== Main Options > Header ========================
553
  $wp_logo = weaverx_get_wp_custom_logo_url();
554
 
555
  if ( $wp_logo ) {
556
+ $wp_logo_html = "<img src='{$wp_logo}' alt='logo' style='max-height:16px;margin-left:10px;' />";
557
  } else {
558
  $wp_logo_html = __( 'Not set', 'weaver-xtreme' );
559
  }
591
  'info' => __( 'Specify search icon, text and background colors Search section of Content Areas tab.', 'weaver-xtreme' /*adm*/ ),
592
  ),
593
 
594
+ array(
595
+ 'name' => __( 'Global Header Area Replacement', 'weaver-xtreme' ),
596
+ 'id' => 'pb_header_replace_page_id',
597
+ 'type' => 'widetext',
598
+ 'info' => __( 'Provide any page or post ID to serve as global replacement for Header area. This will override and replace most other settings in this section.', 'weaver-xtreme' ),
599
+ ),
600
+ array(
601
+ 'name' => '<small>' . __( 'Page Builder Replacements', 'weaver-xtreme' /*adm*/ ) . '</small>',
602
+ 'type' => 'note',
603
+ 'info' => __( 'The Customizer interface has options to specify a Replacement Area from page builders.', 'weaver-xtreme' /*adm*/ ),
604
+ ),
605
+
606
+ array(
607
+ 'name' => '<small>' . __( 'Hide Weaver Menus', 'weaver-xtreme' /*adm*/ ) . '</small>',
608
+ 'id' => 'pb_header_hide_menus',
609
+ 'type' => 'checkbox',
610
+ 'info' => __( 'Check to hide the Weaver Primary Menu normally displayed below the replacement page.', 'weaver-xtreme' /*adm*/ ),
611
+ ),
612
+
613
  array( 'type' => 'submit' ),
614
 
615
  array(
2297
  'type' => 'link',
2298
  'info' => __( 'Color for links in Footer (Uses Standard Link colors if left blank).', 'weaver-xtreme' /*adm*/ ),
2299
  ),
2300
+
2301
+ array( 'name' => __( 'Footer Other options', 'weaver-xtreme' ), 'type' => 'break' ),
2302
+
2303
+ array(
2304
+ 'name' => __( 'Global Footer Area Replacement', 'weaver-xtreme' ),
2305
+ 'id' => 'pb_footer_replace_page_id',
2306
+ 'type' => 'widetext',
2307
+ 'info' => __( 'Provide any page or post ID to serve as global replacement for entire Footer area. This will override and replace most other settings in this section.', 'weaver-xtreme' ),
2308
+ ),
2309
+ array(
2310
+ 'name' => '<small>' . __( 'Page Builder Replacements', 'weaver-xtreme' /*adm*/ ) . '</small>',
2311
+ 'type' => 'note',
2312
+ 'info' => __( 'The Customizer interface has options to specify a Replacement Area from page builders.', 'weaver-xtreme' /*adm*/ ),
2313
+ ),
2314
+
2315
  array( 'type' => 'submit' ),
2316
 
2317
  array(
admin/admin-saverestore.php CHANGED
@@ -9,15 +9,6 @@ if ( ! defined( 'ABSPATH' ) ) {
9
  */
10
 
11
  function weaverx_ts_admin_saverestore() {
12
-
13
- if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
14
- if ( function_exists( 'weaverx_5_admin_saverestore' ) ) {
15
- weaverx_5_admin_saverestore( true );
16
- } else {
17
- echo '<p>' . __( 'Legacy Interface No Longer Supported', 'weaver-xtreme' );
18
- }
19
- } else {
20
  require_once( dirname( __FILE__ ) . '/admin-saverestore4.php' );
21
  weaverx_ts_admin_saverestore4(); // Legacy version
22
- }
23
  }
9
  */
10
 
11
  function weaverx_ts_admin_saverestore() {
 
 
 
 
 
 
 
 
12
  require_once( dirname( __FILE__ ) . '/admin-saverestore4.php' );
13
  weaverx_ts_admin_saverestore4(); // Legacy version
 
14
  }
admin/admin-saverestore4.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  } // Exit if accessed directly
@@ -8,11 +9,13 @@ if ( ! defined( 'ABSPATH' ) ) {
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'];
@@ -40,6 +43,16 @@ function weaverx_ts_admin_saverestore4() {
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>
@@ -81,7 +94,7 @@ function weaverx_process_options_admin_standard( $processed ) {
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' );
@@ -123,14 +136,14 @@ function weaverx_saverestore() {
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*/ ); ?>
1
  <?php
2
+ /** @noinspection PhpMissingReturnTypeInspection */
3
  if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  } // Exit if accessed directly
9
  *
10
  */
11
 
12
+ function weaverx_ts_admin_saverestore4() {
13
 
14
+ $func = WEAVER_GET_OPTION;
15
+
16
+ $saved = $func( apply_filters( 'weaverx_options', 'weaverx_settings_backup' ), array() );
17
 
 
18
 
 
19
  $style_date = '';
20
  if ( ! empty( $saved ) ) {
21
  $style_date = $saved['style_date'];
43
  <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>
44
  <?php
45
  weaverx_nonce_field( 'restore_mytheme' );
46
+
47
+ if ( version_compare( WEAVERX_VERSION, '4.9.0', '<' ) && get_option( 'weaverx5_settings', false ) ) {
48
+ ?>
49
+ <hr>
50
+ <input class="button-primary" type="submit" name="remove_v5_settings" value="<?php _e( 'Delete V5 Beta Settings', 'weaver-xtreme' /*adm*/ ); ?>"/>
51
+ <strong><?php _e( 'You have Weaver Xtreme V5 Beta settings. Click to remove them and associated style files.', 'weaver-xtreme' /*adm*/ ); ?></strong>
52
+ <?php weaverx_nonce_field( 'remove_v5_settings' ); ?>
53
+ <hr>
54
+ <?php
55
+ }
56
  do_action( 'weaverxplus_admin', 'save_restore' );
57
  ?>
58
  </form>
94
  }
95
  // delete everything!
96
  weaverx_save_msg( __( 'All Weaver Xtreme settings have been reset to the defaults.', 'weaver-xtreme' ) );
97
+ delete_option( apply_filters( 'weaverx_options', WEAVER_SETTINGS_NAME ) );
98
  global $weaverx_opts_cache;
99
  $weaverx_opts_cache = false; // clear the cache
100
  weaverx_init_opts( 'reset_weaverx' );
136
 
137
  <h3><?php _e( 'Download Current Settings To Your Computer', 'weaver-xtreme' /*adm*/ ); ?></h3>
138
 
139
+ <a href="<?php echo $download_path . '?_wpnonce=' . $nonce; ?>"><img src="<?php echo esc_url( $download_img_path ); ?>" alt='download'/>
140
  &nbsp; <strong><?php _e( 'Download', 'weaver-xtreme' /*adm*/ ); ?></strong>&nbsp;</a> -
141
  <?php _e( '<strong>Save all</strong> current settings to file on your computer.
142
  (Full settings backup, including those marked with &diams;.) <em>File:</em>', 'weaver-xtreme' /*adm*/ ); ?>
143
  <strong>weaverx-backup-settings<?php echo $a_pro; ?>.wxb</strong>
144
  <br/>
145
  <br/>
146
+ <a href="<?php echo $download_path . '?_wpnoncet=' . $nonce; ?>"><img src="<?php echo esc_url( $download_img_path ); ?>" alt='download'/>
147
  &nbsp;<strong><?php _e( 'Download', 'weaver-xtreme' /*adm*/ ); ?></strong></a>&nbsp; -
148
  <?php _e( '<strong><em>Save only theme related</em></strong> current settings to file on your computer. <em>File:</em>
149
  <strong>weaverx-theme-settings<?php echo $a_pro;?>.wxt</strong>', 'weaver-xtreme' /*adm*/ ); ?>
admin/admin-subthemes.php CHANGED
@@ -10,17 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
10
 
11
  function weaverx_admin_subthemes() {
12
 
13
- if ( version_compare( WEAVERX_VERSION, '4.9.0', '>=' ) ) {
14
-
15
- if ( function_exists( 'weaverx_5_admin_subthemes' ) ) {
16
- weaverx_5_admin_subthemes( true );
17
- } else {
18
- echo '<p>' . __( 'Legacy Interface No Longer Supported', 'weaver-xtreme' );
19
- }
20
-
21
- } else {
22
- require_once( dirname( __FILE__ ) . '/admin-subthemes4.php' );
23
- weaverx_admin_subthemes4();
24
- }
25
  }
26
 
10
 
11
  function weaverx_admin_subthemes() {
12
 
13
+ require_once( dirname( __FILE__ ) . '/admin-subthemes4.php' );
14
+ weaverx_admin_subthemes4();
 
 
 
 
 
 
 
 
 
 
15
  }
16
 
admin/admin-subthemes4.php CHANGED
@@ -1,4 +1,7 @@
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*/ ) ); ?>
1
+ <?php /**
2
+ *
3
+ * @noinspection PhpUndefinedFunctionInspection
4
+ */
5
  // Weaver 4 legacy interface options
6
  function weaverx_admin_subthemes4() {
7
  weaverx_tab_title( __( 'Predefined Weaver Xtreme Subthemes', 'weaver-xtreme' ), 'help.html#PredefinedThemes', __( 'Help for Weaver Xtreme Predefined Themes', 'weaver-xtreme' /*adm*/ ) ); ?>
admin/assets/yetii/bsdlicense.txt DELETED
@@ -1,29 +0,0 @@
1
- Copyright (c) kminek.pl & Grzegorz Wójcik
2
-
3
- All rights reserved.
4
-
5
- Redistribution and use in source and binary forms, with or without modification, are permitted
6
- provided that the following conditions are met:
7
-
8
- * Redistributions of source code must retain the above copyright notice,
9
- this list of conditions and the following disclaimer.
10
-
11
- * Redistributions in binary form must reproduce the above copyright notice,
12
- this list of conditions and the following disclaimer in the documentation and/or other
13
- materials provided with the distribution.
14
-
15
- * Neither the name of the kminek.pl & Grzegorz Wójcik nor the names of its contributors
16
- may be used to endorse or promote products derived from this software without
17
- specific prior written permission.
18
-
19
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/yetii/html5.min.js DELETED
@@ -1,8 +0,0 @@
1
- /*
2
- HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3
- */
4
- (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
5
- a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
6
- c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
7
- "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
8
- if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
 
 
 
 
 
 
 
 
admin/assets/yetii/yetii-weaver.css DELETED
@@ -1,84 +0,0 @@
1
- /* yetti style for weaaver theme support */
2
- div.yetii {
3
- width: 95%;
4
- margin: 0 0 20px 0;
5
- }
6
-
7
- ul.yetii {
8
- list-style-type: none;
9
- width: 100%;
10
- float: left;
11
- border-bottom: 4px ridge #ddd;
12
- margin-bottom: 8px;
13
- }
14
-
15
- ul.yetii li {
16
- margin: 0 2px 0 0;
17
- float: left;
18
- }
19
-
20
- ul.yetii a {
21
- float: left;
22
- display: block;
23
- padding: 4px 8px;
24
- border: 1px solid #ddd;
25
- border-bottom: 0;
26
- color: #666;
27
- background: #eee;
28
- text-decoration: none;
29
- font-weight: bold;
30
- background-image: linear-gradient(#f0f0f0,#c8c8c8);
31
- border-top-left-radius:6px;
32
- border-top-right-radius:6px;
33
- }
34
-
35
- ul.yetii a:hover {
36
- background: #fff;
37
- }
38
-
39
- ul.yetii a.active {
40
- background: #fff;
41
- color: #00f;
42
- background-image: linear-gradient(#f8f8f8,#eee);
43
- }
44
- /* -- */
45
- div.yetiisub {
46
- width: 100%;
47
- margin: 0 0 20px 0;
48
- }
49
-
50
- ul.yetiisub {
51
- list-style-type: none;
52
- width: 100%;
53
- float: left;
54
- margin-bottom: 8px;
55
- }
56
-
57
- ul.yetiisub li {
58
- margin: 0 2px 2px 0px;
59
- float: left;
60
- }
61
-
62
- ul.yetiisub a {
63
- float: left;
64
- padding: 4px 8px;
65
- border: 1px solid #ccc;
66
- color: #666;
67
- background: #f0f0f0;
68
- text-decoration: none;
69
- font-style: italic;
70
- font-weight: bold;
71
- background-image: linear-gradient(#f8f8f8,#c8c8c8);
72
- border-top-left-radius:6px;
73
- border-top-right-radius:6px;
74
- }
75
-
76
- ul.yetiisub a:hover {
77
- background: #fefefe !important;
78
- }
79
-
80
- ul.yetiisub a.active {
81
- background: #fff;
82
- color: #00f;
83
- background-image: linear-gradient(#fff,#e8e8e8);
84
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/yetii/yetii-weaver.min.css DELETED
@@ -1 +0,0 @@
1
- div.yetii{width:95%;margin:0 0 20px 0}ul.yetii{list-style-type:none;width:100%;float:left;border-bottom:4px ridge #ddd;margin-bottom:8px}ul.yetii li{margin:0 2px 0 0;float:left}ul.yetii a{float:left;display:block;padding:4px 8px;border:1px solid #ddd;border-bottom:0;color:#666;background:#eee;text-decoration:none;font-weight:bold;background-image:linear-gradient(#f0f0f0,#c8c8c8);border-top-left-radius:6px;border-top-right-radius:6px}ul.yetii a:hover{background:#fff}ul.yetii a.active{background:#fff;color:#00f;background-image:linear-gradient(#f8f8f8,#eee)}div.yetiisub{width:100%;margin:0 0 20px 0}ul.yetiisub{list-style-type:none;width:100%;float:left;margin-bottom:8px}ul.yetiisub li{margin:0 2px 2px 0px;float:left}ul.yetiisub a{float:left;padding:4px 8px;border:1px solid #ccc;color:#666;background:#f0f0f0;text-decoration:none;font-style:italic;font-weight:bold;background-image:linear-gradient(#f8f8f8,#c8c8c8);border-top-left-radius:6px;border-top-right-radius:6px}ul.yetiisub a:hover{background:#fefefe!important}ul.yetiisub a.active{background:#fff;color:#00f;background-image:linear-gradient(#fff,#e8e8e8)}
 
admin/assets/yetii/yetii.js DELETED
@@ -1,207 +0,0 @@
1
- /*
2
- Yetii - Yet (E)Another Tab Interface Implementation
3
- version 1.6
4
- http://www.kminek.pl/lab/yetii/
5
- Copyright (c) Grzegorz Wojcik
6
- Code licensed under the BSD License:
7
- http://www.kminek.pl/bsdlicense.txt
8
- */
9
-
10
- function Yetii() {
11
-
12
- this.defaults = {
13
-
14
- id: null,
15
- active: 1,
16
- interval: null,
17
- wait: null,
18
- persist: null,
19
- tabclass: 'tab',
20
- activeclass: 'active',
21
- callback: null,
22
- leavecallback: null
23
-
24
- };
25
-
26
- this.activebackup = null;
27
-
28
- for (var n in arguments[0]) { this.defaults[n]=arguments[0][n]; };
29
-
30
- this.getTabs = function() {
31
-
32
- var retnode = [];
33
- var elem = document.getElementById(this.defaults.id).getElementsByTagName('*');
34
-
35
- var regexp = new RegExp("(^|\\s)" + this.defaults.tabclass.replace(/\-/g, "\\-") + "(\\s|$)");
36
-
37
- for (var i = 0; i < elem.length; i++) {
38
- if (regexp.test(elem[i].className)) retnode.push(elem[i]);
39
- }
40
-
41
- return retnode;
42
-
43
- };
44
-
45
- this.links = document.getElementById(this.defaults.id + '-nav').getElementsByTagName('a');
46
- this.listitems = document.getElementById(this.defaults.id + '-nav').getElementsByTagName('li');
47
-
48
- this.show = function(number) {
49
-
50
- for (var i = 0; i < this.tabs.length; i++) {
51
-
52
- this.tabs[i].style.display = ((i+1)==number) ? 'block' : 'none';
53
-
54
- if ((i+1)==number) {
55
- this.addClass(this.links[i], this.defaults.activeclass);
56
- this.addClass(this.listitems[i], this.defaults.activeclass + 'li');
57
- } else {
58
- this.removeClass(this.links[i], this.defaults.activeclass);
59
- this.removeClass(this.listitems[i], this.defaults.activeclass + 'li');
60
- }
61
-
62
- }
63
-
64
-
65
- if (this.defaults.leavecallback && (number != this.activebackup)) this.defaults.leavecallback(this.defaults.active);
66
-
67
- this.activebackup = number;
68
-
69
-
70
- this.defaults.active = number;
71
-
72
- if (this.defaults.callback) this.defaults.callback(number);
73
-
74
-
75
- };
76
-
77
- this.rotate = function(interval) {
78
-
79
- this.show(this.defaults.active);
80
- this.defaults.active++;
81
-
82
- if (this.defaults.active > this.tabs.length) this.defaults.active = 1;
83
-
84
-
85
- var self = this;
86
-
87
- if (this.defaults.wait) clearTimeout(this.timer2);
88
-
89
- this.timer1 = setTimeout(function(){self.rotate(interval);}, interval*1000);
90
-
91
- };
92
-
93
- this.next = function() {
94
-
95
- var _target = (this.defaults.active + 1 > this.tabs.length) ? 1 : this.defaults.active + 1;
96
- this.show(_target);
97
- this.defaults.active = _target;
98
-
99
- };
100
-
101
- this.previous = function() {
102
-
103
- var _target = ((this.defaults.active - 1) == 0) ? this.tabs.length : this.defaults.active - 1;
104
- this.show(_target);
105
- this.defaults.active = _target;
106
-
107
- };
108
-
109
- this.previous = function() {
110
-
111
- this.defaults.active--;
112
- if(!this.defaults.active) this.defaults.active = this.tabs.length;
113
- this.show(this.defaults.active);
114
-
115
- };
116
-
117
- this.gup = function(name) {
118
- name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
119
- var regexS = "[\\?&]"+name+"=([^&#]*)";
120
- var regex = new RegExp( regexS );
121
- var results = regex.exec( window.location.href );
122
- if (results == null) return null;
123
- else return results[1];
124
- };
125
-
126
- this.parseurl = function(tabinterfaceid) {
127
-
128
- var result = this.gup(tabinterfaceid);
129
-
130
- if (result==null) return null;
131
- if (parseInt(result)) return parseInt(result);
132
- if (document.getElementById(result)) {
133
- for (var i=0;i<this.tabs.length;i++) {
134
- if (this.tabs[i].id == result) return (i+1);
135
- }
136
- }
137
-
138
- return null;
139
-
140
- };
141
-
142
- this.createCookie = function(name,value,days) {
143
- if (days) {
144
- var date = new Date();
145
- date.setTime(date.getTime()+(days*24*60*60*1000));
146
- var expires = "; expires="+date.toGMTString();
147
- }
148
- else var expires = "";
149
- document.cookie = name+"="+value+expires+"; path=/";
150
- };
151
-
152
- this.readCookie = function(name) {
153
- var nameEQ = name + "=";
154
- var ca = document.cookie.split(';');
155
- for(var i=0;i < ca.length;i++) {
156
- var c = ca[i];
157
- while (c.charAt(0)==' ') c = c.substring(1,c.length);
158
- if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
159
- }
160
- return null;
161
- };
162
-
163
- this.contains = function(el, item, from) {
164
- return el.indexOf(item, from) != -1;
165
- };
166
-
167
- this.hasClass = function(el, className){
168
- return this.contains(el.className, className, ' ');
169
- };
170
-
171
- this.addClass = function(el, className){
172
- if (!this.hasClass(el, className)) el.className = (el.className + ' ' + className).replace(/\s{2,}/g, ' ').replace(/^\s+|\s+$/g, '');
173
- };
174
-
175
- this.removeClass = function(el, className){
176
- el.className = el.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)'), '$1');
177
- el.className.replace(/\s{2,}/g, ' ').replace(/^\s+|\s+$/g, '');
178
- };
179
-
180
-
181
- this.tabs = this.getTabs();
182
- this.defaults.active = (this.parseurl(this.defaults.id)) ? this.parseurl(this.defaults.id) : this.defaults.active;
183
- if (this.defaults.persist && this.readCookie(this.defaults.id)) this.defaults.active = this.readCookie(this.defaults.id);
184
- this.activebackup = this.defaults.active;
185
- this.show(this.defaults.active);
186
-
187
- var self = this;
188
- for (var i = 0; i < this.links.length; i++) {
189
- this.links[i].customindex = i+1;
190
- this.links[i].onclick = function(){
191
-
192
- if (self.timer1) clearTimeout(self.timer1);
193
- if (self.timer2) clearTimeout(self.timer2);
194
-
195
- self.show(this.customindex);
196
-
197
- if (self.defaults.persist) self.createCookie(self.defaults.id, this.customindex, 0);
198
-
199
- if (self.defaults.wait) self.timer2 = setTimeout(function(){self.rotate(self.defaults.interval);}, self.defaults.wait*1000);
200
-
201
- return false;
202
- };
203
- }
204
-
205
- if (this.defaults.interval) this.rotate(this.defaults.interval);
206
-
207
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/yetii/yetii.min.js DELETED
@@ -1 +0,0 @@
1
- function Yetii(){this.defaults={id:null,active:1,interval:null,wait:null,persist:null,tabclass:"tab",activeclass:"active",callback:null,leavecallback:null},this.activebackup=null;for(var n in arguments[0])this.defaults[n]=arguments[0][n];this.getTabs=function(){for(var retnode=[],elem=document.getElementById(this.defaults.id).getElementsByTagName("*"),regexp=new RegExp("(^|\\s)"+this.defaults.tabclass.replace(/\-/g,"\\-")+"(\\s|$)"),i=0;i<elem.length;i++)regexp.test(elem[i].className)&&retnode.push(elem[i]);return retnode},this.links=document.getElementById(this.defaults.id+"-nav").getElementsByTagName("a"),this.listitems=document.getElementById(this.defaults.id+"-nav").getElementsByTagName("li"),this.show=function(number){for(var i=0;i<this.tabs.length;i++)this.tabs[i].style.display=i+1==number?"block":"none",i+1==number?(this.addClass(this.links[i],this.defaults.activeclass),this.addClass(this.listitems[i],this.defaults.activeclass+"li")):(this.removeClass(this.links[i],this.defaults.activeclass),this.removeClass(this.listitems[i],this.defaults.activeclass+"li"));this.defaults.leavecallback&&number!=this.activebackup&&this.defaults.leavecallback(this.defaults.active),this.activebackup=number,this.defaults.active=number,this.defaults.callback&&this.defaults.callback(number)},this.rotate=function(interval){this.show(this.defaults.active),this.defaults.active++,this.defaults.active>this.tabs.length&&(this.defaults.active=1);var self=this;this.defaults.wait&&clearTimeout(this.timer2),this.timer1=setTimeout(function(){self.rotate(interval)},1e3*interval)},this.next=function(){var _target=this.defaults.active+1>this.tabs.length?1:this.defaults.active+1;this.show(_target),this.defaults.active=_target},this.previous=function(){var _target=this.defaults.active-1==0?this.tabs.length:this.defaults.active-1;this.show(_target),this.defaults.active=_target},this.previous=function(){this.defaults.active--,this.defaults.active||(this.defaults.active=this.tabs.length),this.show(this.defaults.active)},this.gup=function(name){var regexS="[\\?&]"+(name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"))+"=([^&#]*)",results=new RegExp(regexS).exec(window.location.href);return null==results?null:results[1]},this.parseurl=function(tabinterfaceid){var result=this.gup(tabinterfaceid);if(null==result)return null;if(parseInt(result))return parseInt(result);if(document.getElementById(result))for(var i=0;i<this.tabs.length;i++)if(this.tabs[i].id==result)return i+1;return null},this.createCookie=function(name,value,days){if(days){var date=new Date;date.setTime(date.getTime()+24*days*60*60*1e3);var expires="; expires="+date.toGMTString()}else expires="";document.cookie=name+"="+value+expires+"; path=/"},this.readCookie=function(name){for(var nameEQ=name+"=",ca=document.cookie.split(";"),i=0;i<ca.length;i++){for(var c=ca[i];" "==c.charAt(0);)c=c.substring(1,c.length);if(0==c.indexOf(nameEQ))return c.substring(nameEQ.length,c.length)}return null},this.contains=function(el,item,from){return-1!=el.indexOf(item,from)},this.hasClass=function(el,className){return this.contains(el.className,className," ")},this.addClass=function(el,className){this.hasClass(el,className)||(el.className=(el.className+" "+className).replace(/\s{2,}/g," ").replace(/^\s+|\s+$/g,""))},this.removeClass=function(el,className){el.className=el.className.replace(new RegExp("(^|\\s)"+className+"(?:\\s|$)"),"$1"),el.className.replace(/\s{2,}/g," ").replace(/^\s+|\s+$/g,"")},this.tabs=this.getTabs(),this.defaults.active=this.parseurl(this.defaults.id)?this.parseurl(this.defaults.id):this.defaults.active,this.defaults.persist&&this.readCookie(this.defaults.id)&&(this.defaults.active=this.readCookie(this.defaults.id)),this.activebackup=this.defaults.active,this.show(this.defaults.active);for(var self=this,i=0;i<this.links.length;i++)this.links[i].customindex=i+1,this.links[i].onclick=function(){return self.timer1&&clearTimeout(self.timer1),self.timer2&&clearTimeout(self.timer2),self.show(this.customindex),self.defaults.persist&&self.createCookie(self.defaults.id,this.customindex,0),self.defaults.wait&&(self.timer2=setTimeout(function(){self.rotate(self.defaults.interval)},1e3*self.defaults.wait)),!1};this.defaults.interval&&this.rotate(this.defaults.interval)}
 
help/help.html CHANGED
@@ -1,5 +1,5 @@
1
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
  <title>Weaver X Theme Support</title>
1
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3
  <head>
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
  <title>Weaver X Theme Support</title>
includes/wvrx-ts-editor-style.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  // ======================================= MCE CSS FILE GENERATION ================================
3
 
4
  /**
@@ -19,35 +20,32 @@
19
  function weaverx_ts_save_editor_css( $usename, $editor ) {
20
 
21
  if (!current_user_can( 'edit_theme_options' ) ) {
22
- return;
23
  }
24
 
25
  $save_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes';
26
  $save_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes';
27
 
28
-
29
-
30
  $theme_dir_exists = wp_mkdir_p($save_dir); // direct to wp mkdir
31
  if (!$theme_dir_exists) {
32
  weaverx_f_file_access_fail(__('Unable to create directory to save editor style file. Probably a file system permission problem. Directory', 'weaver-xtreme' /*adm*/) . $save_dir);
33
- return;
34
  }
35
 
36
  $theme_dir_writable = $theme_dir_exists;
37
 
38
  if (!@is_writable($save_dir)) { // direct php access
39
  weaverx_f_file_access_fail(__('Directory not writable to save editor style file. Probably a file system permission problem. Directory: ', 'weaver-xtreme' /*adm*/) . $save_dir);
40
- return;
41
  }
42
 
43
  $filename = $save_dir . '/'. $usename; // we will add txt
44
 
45
  if (!$theme_dir_writable || !$theme_dir_exists || !($handle = fopen($filename, 'w')) ) { // Direct php
46
  weaverx_f_file_access_fail(__('Unable to create editor style file. Probably a file system permission problem. File: ', 'weaver-xtreme' /*adm*/) . $filename);
47
- return;
48
  }
49
 
50
- ;
51
  fwrite($handle, weaverx_ts_output_edit_style( $editor )); // this is where the real work happens
52
 
53
  if (!fclose($handle)) {
1
  <?php
2
+ /** @noinspection PhpMissingReturnTypeInspection */
3
  // ======================================= MCE CSS FILE GENERATION ================================
4
 
5
  /**
20
  function weaverx_ts_save_editor_css( $usename, $editor ) {
21
 
22
  if (!current_user_can( 'edit_theme_options' ) ) {
23
+ return '';
24
  }
25
 
26
  $save_dir = weaverx_f_uploads_base_dir() . 'weaverx-subthemes';
27
  $save_url = weaverx_f_uploads_base_url() . 'weaverx-subthemes';
28
 
 
 
29
  $theme_dir_exists = wp_mkdir_p($save_dir); // direct to wp mkdir
30
  if (!$theme_dir_exists) {
31
  weaverx_f_file_access_fail(__('Unable to create directory to save editor style file. Probably a file system permission problem. Directory', 'weaver-xtreme' /*adm*/) . $save_dir);
32
+ return '';
33
  }
34
 
35
  $theme_dir_writable = $theme_dir_exists;
36
 
37
  if (!@is_writable($save_dir)) { // direct php access
38
  weaverx_f_file_access_fail(__('Directory not writable to save editor style file. Probably a file system permission problem. Directory: ', 'weaver-xtreme' /*adm*/) . $save_dir);
39
+ return '';
40
  }
41
 
42
  $filename = $save_dir . '/'. $usename; // we will add txt
43
 
44
  if (!$theme_dir_writable || !$theme_dir_exists || !($handle = fopen($filename, 'w')) ) { // Direct php
45
  weaverx_f_file_access_fail(__('Unable to create editor style file. Probably a file system permission problem. File: ', 'weaver-xtreme' /*adm*/) . $filename);
46
+ return '';
47
  }
48
 
 
49
  fwrite($handle, weaverx_ts_output_edit_style( $editor )); // this is where the real work happens
50
 
51
  if (!fclose($handle)) {
includes/wvrx-ts-runtime-lib.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
 
3
  // # Weaver X SW Globals ==============================================================
4
  $wvrx_ts_opts_cache = false; // internal cache for all settings
@@ -308,20 +309,53 @@ function weaverx_ts_get_sysinfo() {
308
  // ======== fallback file support ======
309
 
310
  function weaverx_ts_write_to_upload( $filename, $output ) {
311
- // some sytems fail using $wp_filesystem to create editor file. This will use direct PHP I/O (not allowed in themes) to avoid the problem.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
 
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
  }
1
  <?php
2
+ /** @noinspection PhpMissingReturnTypeInspection */
3
 
4
  // # Weaver X SW Globals ==============================================================
5
  $wvrx_ts_opts_cache = false; // internal cache for all settings
309
  // ======== fallback file support ======
310
 
311
  function weaverx_ts_write_to_upload( $filename, $output ) {
312
+
313
+ // first, try using WP_Filesystem - it should be "safer"
314
+ global $wp_filesystem;
315
+
316
+ if ( empty( $wp_filesystem ) ) { /* load if not already present */
317
+ require_once( ABSPATH . '/wp-admin/includes/file.php' );
318
+ WP_Filesystem();
319
+ }
320
+
321
+ $upload_dir = wp_upload_dir(); // Grab uploads folder array
322
+ $dir = trailingslashit( $upload_dir['basedir'] ) . WEAVERX_SUBTHEMES_DIR . DIRECTORY_SEPARATOR; // Set storage directory path
323
+
324
+ WP_Filesystem(); // Initial WP file system
325
+ $wp_filesystem->mkdir( $dir ); // Make a new folder 'weaverx-subthemes' for storing our file if not created already.
326
+
327
+ if ( ! @is_writable( $dir ) ) { // direct php access
328
+ if ( function_exists( 'weaverx_ts_write_to_upload' ) ) {
329
+ return weaverx_ts_altwrite_to_upload( $filename, $output );
330
+ } else {
331
+ weaverx_f_file_access_fail( esc_html__( 'Directory not writable to save editor style file. Please install and activate the Weaver Xtreme Theme Support plugin. Directory: ', 'weaver-xtreme' ) . $dir );
332
+ }
333
+
334
+ return false;
335
+ }
336
+
337
+ $wp_filesystem->put_contents( $dir . $filename, $output, 0744 ); // Store in the file.
338
+ return true;
339
+ }
340
+
341
+ function weaverx_ts_altwrite_to_upload( $filename, $output ) {
342
+ // some systems fail using $wp_filesystem to create editor file. This will use direct PHP I/O (not allowed in themes) to avoid the problem.
343
 
344
  // recreate the directory name
345
 
346
  $upload_dir = wp_upload_dir(); // Grab uploads folder array
347
+ $dir = trailingslashit( $upload_dir['basedir'] ) . WEAVERX_SUBTHEMES_DIR . DIRECTORY_SEPARATOR; // Set storage directory path
348
 
349
  if ( ! wp_mkdir_p( $dir ) ) {
350
  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 );
351
+ return false;
352
  }
353
 
354
  $file = fopen( $dir . $filename, 'w' );
355
  if ( fwrite( $file, $output ) == false ) {
356
  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 );
357
+ return false;
358
  }
359
  fclose( $file );
360
+ return true;
361
  }
includes/wvrx-ts-shortcodes.php CHANGED
@@ -39,7 +39,7 @@ function wvrx_ts_setup_shortcodes() {
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,
@@ -110,18 +110,18 @@ function wvrx_ts_sc_box( $args = '', $text ) {
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
@@ -646,7 +646,7 @@ function wvrx_ts_sc_vimeo( $args = '' ) {
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;
@@ -679,7 +679,7 @@ function wvrx_ts_sc_html( $vals = '' ) { // [html style='customstyle'
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' => '',
@@ -700,7 +700,7 @@ function wvrx_ts_sc_div( $vals = '', $text ) { // [div] - all ====
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' => '',
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,
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 = false ) {
125
  extract( shortcode_atts( array(
126
  'device' => 'default', // desktop, mobile, smalltablet, phone, all
127
  'logged_in' => 'default', // true or false
646
  }
647
 
648
  $ret = "\n" . $cntr1 . '<iframe src="' . $url
649
+ . '" width="' . $w . '" height="' . $h . '" frameborder="0" allowfullscreen></iframe>'
650
  . $cntr2 . "\n";
651
 
652
  return $ret;
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' => '',
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' => '',
includes/wvrx-ts-widgets.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /*
3
  * Weaver X Widgets and shortcodes - widgets
4
  */
1
  <?php
2
+ /** @noinspection PhpMissingReturnTypeInspection */
3
  /*
4
  * Weaver X Widgets and shortcodes - widgets
5
  */
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.4
12
  Requires PHP: 5.6
13
- Tested up to: 5.7
14
- Stable tag: 4.4.5
15
 
16
  A useful shortcode and widget collection for Weaver Xtreme
17
 
@@ -78,6 +78,16 @@ Support for this plugin can best be found at our forum - http://forum.weaverthem
78
  See ChangeLog for changes to this version.
79
 
80
  == ChangeLog =
 
 
 
 
 
 
 
 
 
 
81
 
82
  = 4.4.2 =
83
  * Update: WP 5.7 compatibility tag
10
  Text Domain: weaverx-theme-support
11
  Requires at least: 5.4
12
  Requires PHP: 5.6
13
+ Tested up to: 5.8
14
+ Stable tag: 4.9.2
15
 
16
  A useful shortcode and widget collection for Weaver Xtreme
17
 
78
  See ChangeLog for changes to this version.
79
 
80
  == ChangeLog =
81
+ = 4.9.2 =
82
+ * Added: Delete V5 Beta data and files
83
+
84
+ = 4.9 =
85
+ * Update: WP compatibility tag update
86
+ * Added: Version now compatible with both Weaver Xtreme 4 and 5.
87
+
88
+ = 4.4.6 =
89
+ * Update: WP compatibility tag
90
+ * Fix: PHP 8 compatibility
91
 
92
  = 4.4.2 =
93
  * Update: WP 5.7 compatibility tag
weaverx-ts.php CHANGED
@@ -1,11 +1,12 @@
1
  <?php
 
2
  /*
3
  Plugin Name: Weaver Xtreme Theme Support
4
  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.5
9
  License: GPL V3
10
 
11
  Weaver Xtreme Theme Support
@@ -35,13 +36,13 @@ function wvrx_ts_alert( $msg ) {
35
  echo "<script> alert('" . esc_html( $msg ) . "'); </script>";
36
  }
37
 
38
- if ( strpos( $theme, '/weaver-xtreme' ) !== false ) { // only load if Weaver Xtreme is the theme
 
39
 
40
- define( 'WVRX_TS_VERSION', '4.4.5' );
41
  define( 'WVRX_TS_MINIFY', '' ); // '' for dev, '.min' for production
42
  define( 'WVRX_TS_PAGEBUILDERS', true );
43
 
44
-
45
  function wvrx_ts_installed() {
46
  return true;
47
  }
1
  <?php
2
+ /** @noinspection PhpMissingReturnTypeInspection */
3
  /*
4
  Plugin Name: Weaver Xtreme Theme Support
5
  Plugin URI: http://weavertheme.com/plugins
6
  Description: Weaver Xtreme Theme Support - Legacy Admin plus a package of useful shortcodes and widgets that integrate closely with the Weaver Xtreme theme.
7
  Author: wpweaver
8
  Author URI: http://weavertheme.com/about/
9
+ Version: 4.9.2
10
  License: GPL V3
11
 
12
  Weaver Xtreme Theme Support
36
  echo "<script> alert('" . esc_html( $msg ) . "'); </script>";
37
  }
38
 
39
+ if ( strpos( $theme, '/weaver-xtreme' ) !== false ||
40
+ strpos( $theme, '/weaver-xtreme-5' ) !== false) { // only load if Weaver Xtreme is the theme
41
 
42
+ define( 'WVRX_TS_VERSION', '4.9.2' );
43
  define( 'WVRX_TS_MINIFY', '' ); // '' for dev, '.min' for production
44
  define( 'WVRX_TS_PAGEBUILDERS', true );
45
 
 
46
  function wvrx_ts_installed() {
47
  return true;
48
  }