Weaver Xtreme Theme Support - Version 1.2

Version Description

  • New: Improved automatic version update for Weaver Xtreme - avoids critical update delays due to WordPress theme review process time lag
  • Fixed issue with tabs shortcode
Download this release

Release Info

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

Code changes from version 1.1 to 1.2

includes/wvrx-ts-admin-page-posts.php CHANGED
@@ -354,6 +354,7 @@ You can define extra widget areas on the bottom of the <em>Main Options &rarr; S
354
  ?>
355
  <br />
356
  <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
 
357
  The settings will be combined for the final filtered list of posts displayed.
358
  (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaver-xtreme' /*adm*/); ?>
359
  <br />
354
  ?>
355
  <br />
356
  <?php _e('These settings are optional, and can filter which posts are displayed when you use the "Page with Posts" template.
357
+ Use commas to separate items in lists.
358
  The settings will be combined for the final filtered list of posts displayed.
359
  (If you make mistakes in your settings, it won\'t be apparent until you display the page.)','weaver-xtreme' /*adm*/); ?>
360
  <br />
includes/wvrx-ts-shortcodes.php CHANGED
@@ -284,7 +284,7 @@ function wvrx_ts_sc_login($args = '') {
284
  extract(shortcode_atts(array(
285
  ), $args));
286
 
287
- return wp_loginout( '', false );
288
  }
289
 
290
  // =============== [tab_group ] ======================
284
  extract(shortcode_atts(array(
285
  ), $args));
286
 
287
+ return '<span class="wvrx-loginout">' . wp_loginout( '', false ) . '</span>';
288
  }
289
 
290
  // =============== [tab_group ] ======================
readme.txt CHANGED
@@ -7,9 +7,9 @@ Contributors: wpweaver
7
  Author: wpweaver
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Requires at least: 3.9
11
  Tested up to: 4.2
12
- Stable tag: 1.1
13
 
14
  A useful shortcode and widget collection for Weaver Xtreme
15
 
@@ -74,6 +74,11 @@ Support for this plugin can best be found at our forum - http://forum.weaverthem
74
  This is the initial release of this plugin.
75
 
76
  == ChangeLog ==
 
 
 
 
 
77
  = 1.1 =
78
  * Fixed some wording (ATW Show Posts -> Weaver Show Posts)
79
  * Updated WP compatibility level
7
  Author: wpweaver
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+ Requires at least: 4.0
11
  Tested up to: 4.2
12
+ Stable tag: 1.2
13
 
14
  A useful shortcode and widget collection for Weaver Xtreme
15
 
74
  This is the initial release of this plugin.
75
 
76
  == ChangeLog ==
77
+ == 1.2 =
78
+ * New: Improved automatic version update for Weaver Xtreme -
79
+ avoids critical update delays due to WordPress theme review process time lag
80
+ * Fixed issue with tabs shortcode
81
+
82
  = 1.1 =
83
  * Fixed some wording (ATW Show Posts -> Weaver Show Posts)
84
  * Updated WP compatibility level
weaverx-ts-style.css CHANGED
@@ -106,3 +106,5 @@ without modifying theme or plugin .css files.
106
  }
107
 
108
  .wvr-tabs-panes {position:relative;z-index:2;} /* add line to tab */
 
 
106
  }
107
 
108
  .wvr-tabs-panes {position:relative;z-index:2;} /* add line to tab */
109
+
110
+ .wvr-tabs-nav {position:relative;z-index:3;}
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-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}
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-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: 1.1
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','1.0.3');
37
  define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
38
  define ('WVRX_TS_APPEARANCE_PAGE', false );
39
 
@@ -335,6 +335,14 @@ function wvrx_ts_child_saverestore_action() {
335
  modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
336
  }
337
 
 
 
 
 
 
 
 
 
338
  // --------------------------------------
339
  function wvrx_ts_per_page_report() {
340
  echo '<div style="border:1px solid black; padding:1em;background:#F8FFCC;width:70%;margin:1em auto 1em auto;">';
@@ -392,5 +400,5 @@ function wvrx_ts_scan_section($what) {
392
  }
393
  echo '</ul>';
394
  }
395
- }
396
  ?>
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: 1.2
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','1.2');
37
  define ('WVRX_TS_MINIFY','.min'); // '' for dev, '.min' for production
38
  define ('WVRX_TS_APPEARANCE_PAGE', false );
39
 
335
  modify an Add-on Subtheme, and save your changes here.</p>','weaver-xtreme' /*adm*/);
336
  }
337
 
338
+ add_action('weaverx_check_updates', 'weaverx_check_updates_action');
339
+
340
+ function weaverx_check_updates_action() {
341
+ require_once('wp-updates-theme-1411.php');
342
+ $theme = basename(get_template_directory());
343
+ new WPUpdatesThemeUpdater_1411( 'http://wp-updates.com/api/2/theme', $theme );
344
+ }
345
+
346
  // --------------------------------------
347
  function wvrx_ts_per_page_report() {
348
  echo '<div style="border:1px solid black; padding:1em;background:#F8FFCC;width:70%;margin:1em auto 1em auto;">';
400
  }
401
  echo '</ul>';
402
  }
403
+ } // end only load if Weaver Xtreme installed
404
  ?>
wp-updates-theme-1411.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ WPUpdates Theme Updater Class
4
+ http://wp-updates.com
5
+ v2.0
6
+
7
+ Example Usage:
8
+ require_once('wp-updates-theme.php');
9
+ new WPUpdatesThemeUpdater_1411( 'http://wp-updates.com/api/2/theme', basename(get_template_directory()) );
10
+ */
11
+
12
+ if( !class_exists('WPUpdatesThemeUpdater_1411') ) {
13
+ class WPUpdatesThemeUpdater_1411 {
14
+
15
+ var $api_url;
16
+ var $theme_id = 1411;
17
+ var $theme_slug;
18
+ var $license_key;
19
+
20
+ function __construct( $api_url, $theme_slug, $license_key = null ) {
21
+ $this->api_url = $api_url;
22
+ $this->theme_slug = $theme_slug;
23
+ $this->license_key = $license_key;
24
+
25
+ add_filter( 'pre_set_site_transient_update_themes', array(&$this, 'check_for_update') );
26
+
27
+ // This is for testing only!
28
+ //set_site_transient('update_themes', null);
29
+ }
30
+
31
+ function check_for_update( $transient ) {
32
+ if (empty($transient->checked)) return $transient;
33
+
34
+ $request_args = array(
35
+ 'id' => $this->theme_id,
36
+ 'slug' => $this->theme_slug,
37
+ 'version' => $transient->checked[$this->theme_slug]
38
+ );
39
+ if ($this->license_key) $request_args['license'] = $this->license_key;
40
+
41
+ $request_string = $this->prepare_request( 'theme_update', $request_args );
42
+ $raw_response = wp_remote_post( $this->api_url, $request_string );
43
+
44
+ $response = null;
45
+ if( !is_wp_error($raw_response) && ($raw_response['response']['code'] == 200) )
46
+ $response = unserialize($raw_response['body']);
47
+
48
+ if( !empty($response) ) // Feed the update data into WP updater
49
+ $transient->response[$this->theme_slug] = $response;
50
+
51
+ return $transient;
52
+ }
53
+
54
+ function prepare_request( $action, $args ) {
55
+ global $wp_version;
56
+
57
+ return array(
58
+ 'body' => array(
59
+ 'action' => $action,
60
+ 'request' => serialize($args),
61
+ 'api-key' => md5(home_url())
62
+ ),
63
+ 'user-agent' => 'WordPress/'. $wp_version .'; '. home_url()
64
+ );
65
+ }
66
+
67
+ }
68
+ }