Toolset Types – Custom Post Types, Custom Fields and Taxonomies - Version 1.7.6

Version Description

  • Release date: 2015-07-20
  • Change Installer version to 1.6.4 - to reduce load time and avoid to much update requests.
Download this release

Release Info

Developer iworks
Plugin Icon 128x128 Toolset Types – Custom Post Types, Custom Fields and Taxonomies
Version 1.7.6
Comparing to
See all releases

Code changes from version 1.7.5 to 1.7.6

embedded/bootstrap.php CHANGED
@@ -133,7 +133,7 @@ function wpcf_embedded_init() {
133
  // Define necessary constants if plugin is not present
134
  // This ones are skipped if used as embedded code!
135
  if ( !defined( 'WPCF_VERSION' ) ) {
136
- define( 'WPCF_VERSION', '1.7.5' );
137
  define( 'WPCF_META_PREFIX', 'wpcf-' );
138
  }
139
 
133
  // Define necessary constants if plugin is not present
134
  // This ones are skipped if used as embedded code!
135
  if ( !defined( 'WPCF_VERSION' ) ) {
136
+ define( 'WPCF_VERSION', '1.7.6' );
137
  define( 'WPCF_META_PREFIX', 'wpcf-' );
138
  }
139
 
embedded/plugin.php CHANGED
@@ -5,7 +5,7 @@
5
  Description: Define custom post types, custom taxonomies and custom fields.
6
  Author: OnTheGoSystems
7
  Author URI: http://www.onthegosystems.com
8
- Version: 1.7.5
9
  */
10
  /**
11
  *
5
  Description: Define custom post types, custom taxonomies and custom fields.
6
  Author: OnTheGoSystems
7
  Author URI: http://www.onthegosystems.com
8
+ Version: 1.7.6
9
  */
10
  /**
11
  *
plus/installer/changelog.txt CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  = 1.6 =
2
  * Improved the way plugins are matched: not just by the folder name (slug) but also by name
3
  * Added support for installing and upgrading themes from repositories (currently: Toolset themes)
1
+ = 1.6.4 =
2
+ * Enabled the OTGS_DISABLE_AUTO_UPDATES constant for theme update checks
3
+ * Fixed a bug that was causing Register links to show for all installed plugins
4
+
5
+ = 1.6.3 =
6
+ * Fixed performance issue related to themes upgrade logic
7
+
8
  = 1.6 =
9
  * Improved the way plugins are matched: not just by the folder name (slug) but also by name
10
  * Added support for installing and upgrading themes from repositories (currently: Toolset themes)
plus/installer/includes/class-installer-theme.php CHANGED
@@ -322,7 +322,7 @@ class Installer_Theme_Class {
322
  return $res;
323
  } else {
324
  //Registered
325
- $themes=$this->installer_theme_get_themes();
326
  $res =$this->installer_theme_format_response($themes,$action);
327
  }
328
  }
@@ -339,7 +339,7 @@ class Installer_Theme_Class {
339
  if ($validate_check) {
340
  //Belongs to us
341
  if (($res) && ('theme_information' == $action)) {
342
- $themes=$this->installer_theme_get_themes();
343
  $res =$this->installer_theme_format_response($themes,$action,$args->slug);
344
  }
345
  }
@@ -358,7 +358,7 @@ class Installer_Theme_Class {
358
  }
359
  }
360
  /** Get Themes */
361
- private function installer_theme_get_themes($product_url='') {
362
 
363
  //Query API
364
  if (empty($product_url)) {
@@ -370,35 +370,51 @@ class Installer_Theme_Class {
370
  } else {
371
  $query_remote_url=$product_url;
372
  }
373
-
374
- $response = wp_remote_get($query_remote_url);
 
375
 
376
  //Set $themes to FALSE by default
377
-
378
  $themes=false;
379
 
380
- if (is_wp_error($response)){
381
- //Error detected: http fallback
382
- $query_remote_url = preg_replace("@^https://@", 'http://', $query_remote_url);
 
 
 
 
 
 
 
 
 
 
383
  $response = wp_remote_get($query_remote_url);
384
- }
385
 
386
- if (!(is_wp_error($response))) {
387
- //Not WP error
388
- //Evaluate response
389
- if($response && isset($response['response']['code']) && $response['response']['code'] == 200){
390
- //In this case, response is set and defined, proceed...
391
- $body = wp_remote_retrieve_body($response);
392
- if($body){
393
- $products = json_decode($body, true);
394
- if (isset($products['downloads']['themes'])) {
395
- $themes=$products['downloads']['themes'];
 
 
 
 
 
 
 
396
  }
 
397
  }
398
-
399
  }
400
  }
401
-
402
  //Return themes, can be filtered by user subscription type
403
  return apply_filters('installer_theme_get_themes',$themes,$this->installer_theme_active_tab);
404
  }
@@ -579,7 +595,7 @@ class Installer_Theme_Class {
579
  foreach ($repositories as $k=>$v) {
580
  if (isset($v['products'])) {
581
  $products_url=$v['products'];
582
- $themes= $this->installer_theme_get_themes($products_url);
583
  if ((is_array($themes)) && (!(empty($themes)))) {
584
  //Repo has themes
585
  $repositories_with_themes[]=$k;
@@ -749,7 +765,7 @@ class Installer_Theme_Class {
749
  $products_url = $this->repository_theme_products [$repo_slug];
750
 
751
  // Step3-> we get all available themes in our repository via API based on this URL
752
- $available_themes = $this->installer_theme_get_themes ( $products_url );
753
 
754
  if (! ($available_themes)) {
755
 
322
  return $res;
323
  } else {
324
  //Registered
325
+ $themes=$this->installer_theme_get_themes('',$browse);
326
  $res =$this->installer_theme_format_response($themes,$action);
327
  }
328
  }
339
  if ($validate_check) {
340
  //Belongs to us
341
  if (($res) && ('theme_information' == $action)) {
342
+ $themes=$this->installer_theme_get_themes('',$this->installer_theme_active_tab);
343
  $res =$this->installer_theme_format_response($themes,$action,$args->slug);
344
  }
345
  }
358
  }
359
  }
360
  /** Get Themes */
361
+ private function installer_theme_get_themes($product_url='',$repo_source='') {
362
 
363
  //Query API
364
  if (empty($product_url)) {
370
  } else {
371
  $query_remote_url=$product_url;
372
  }
373
+
374
+ //Let's retrieved current installer settings so we won't be querying all the time
375
+ $current_installer_settings= WP_Installer()->get_settings();
376
 
377
  //Set $themes to FALSE by default
 
378
  $themes=false;
379
 
380
+ if ((is_array($current_installer_settings)) && (!(empty($current_installer_settings)))) {
381
+
382
+ //Set and already defined, retrieved $products
383
+ if (isset($current_installer_settings['repositories'][$repo_source]['data'])) {
384
+ $products=$current_installer_settings['repositories'][$repo_source]['data'];
385
+ if (isset($products['downloads']['themes'])) {
386
+ $themes=$products['downloads']['themes'];
387
+ }
388
+ }
389
+
390
+ } else {
391
+
392
+ //Call API
393
  $response = wp_remote_get($query_remote_url);
 
394
 
395
+ if (is_wp_error($response)){
396
+ //Error detected: http fallback
397
+ $query_remote_url = preg_replace("@^https://@", 'http://', $query_remote_url);
398
+ $response = wp_remote_get($query_remote_url);
399
+ }
400
+
401
+ if (!(is_wp_error($response))) {
402
+ //Not WP error
403
+ //Evaluate response
404
+ if($response && isset($response['response']['code']) && $response['response']['code'] == 200){
405
+ //In this case, response is set and defined, proceed...
406
+ $body = wp_remote_retrieve_body($response);
407
+ if($body){
408
+ $products = json_decode($body, true);
409
+ if (isset($products['downloads']['themes'])) {
410
+ $themes=$products['downloads']['themes'];
411
+ }
412
  }
413
+
414
  }
 
415
  }
416
  }
417
+
418
  //Return themes, can be filtered by user subscription type
419
  return apply_filters('installer_theme_get_themes',$themes,$this->installer_theme_active_tab);
420
  }
595
  foreach ($repositories as $k=>$v) {
596
  if (isset($v['products'])) {
597
  $products_url=$v['products'];
598
+ $themes= $this->installer_theme_get_themes($products_url,$k);
599
  if ((is_array($themes)) && (!(empty($themes)))) {
600
  //Repo has themes
601
  $repositories_with_themes[]=$k;
765
  $products_url = $this->repository_theme_products [$repo_slug];
766
 
767
  // Step3-> we get all available themes in our repository via API based on this URL
768
+ $available_themes = $this->installer_theme_get_themes ( $products_url,$repo_slug );
769
 
770
  if (! ($available_themes)) {
771
 
plus/installer/includes/installer.class.php CHANGED
@@ -247,6 +247,8 @@ final class WP_Installer{
247
  $plugins = get_plugins();
248
 
249
  foreach($this->settings['repositories'] as $repository_id => $repository){
 
 
250
 
251
  foreach($repository['data']['packages'] as $package){
252
 
247
  $plugins = get_plugins();
248
 
249
  foreach($this->settings['repositories'] as $repository_id => $repository){
250
+
251
+ $r_plugins = array();
252
 
253
  foreach($repository['data']['packages'] as $package){
254
 
plus/installer/installer.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- define('WP_INSTALLER_VERSION', '1.6');
3
 
4
  include_once dirname(__FILE__) . '/includes/installer.class.php';
5
 
@@ -17,6 +17,4 @@ function WP_Installer_Show_Products($args = array()){
17
 
18
  WP_Installer()->show_products($args);
19
 
20
- }
21
-
22
-
1
  <?php
2
+ define('WP_INSTALLER_VERSION', '1.6.4');
3
 
4
  include_once dirname(__FILE__) . '/includes/installer.class.php';
5
 
17
 
18
  WP_Installer()->show_products($args);
19
 
20
+ }
 
 
plus/installer/loader.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Installer
4
  Plugin URI: http://wp-compatibility.com/installer-plugin/
5
  Description: Need help buying, installing and upgrading commercial themes and plugins? **Installer** handles all this for you, right from the WordPress admin. Installer lets you find themes and plugins from different sources, then, buy them from within the WordPress admin. Instead of manually uploading and unpacking, you'll see those themes and plugins available, just like any other plugin you're getting from WordPress.org.
6
- Version: 1.6
7
  Author: OnTheGoSystems Inc.
8
  Author URI: http://www.onthegosystems.com/
9
  */
@@ -28,7 +28,7 @@ $wp_installer_instance = dirname(__FILE__) . '/installer.php';
28
  global $wp_installer_instances;
29
  $wp_installer_instances[$wp_installer_instance] = array(
30
  'bootfile' => $wp_installer_instance,
31
- 'version' => '1.6'
32
  );
33
 
34
  // Exception: When WPML prior 3.2 is used, that instance must be used regardless of another newer instance
@@ -38,7 +38,7 @@ if( defined('ICL_SITEPRESS_VERSION') && version_compare(ICL_SITEPRESS_VERSION, '
38
  if(isset($instance['args']['site_key_nags'])){
39
  $wp_installer_instances[$key]['version'] = '9.9';
40
  }else{
41
- unset($wp_installer_instances[$key]);
42
  }
43
  }
44
  }
@@ -119,5 +119,4 @@ if(!function_exists('WP_Installer_Setup')){
119
 
120
  }
121
 
122
- }
123
-
3
  Plugin Name: Installer
4
  Plugin URI: http://wp-compatibility.com/installer-plugin/
5
  Description: Need help buying, installing and upgrading commercial themes and plugins? **Installer** handles all this for you, right from the WordPress admin. Installer lets you find themes and plugins from different sources, then, buy them from within the WordPress admin. Instead of manually uploading and unpacking, you'll see those themes and plugins available, just like any other plugin you're getting from WordPress.org.
6
+ Version: 1.6.4
7
  Author: OnTheGoSystems Inc.
8
  Author URI: http://www.onthegosystems.com/
9
  */
28
  global $wp_installer_instances;
29
  $wp_installer_instances[$wp_installer_instance] = array(
30
  'bootfile' => $wp_installer_instance,
31
+ 'version' => '1.6.4'
32
  );
33
 
34
  // Exception: When WPML prior 3.2 is used, that instance must be used regardless of another newer instance
38
  if(isset($instance['args']['site_key_nags'])){
39
  $wp_installer_instances[$key]['version'] = '9.9';
40
  }else{
41
+ $wp_installer_instances[$key]['version'] = '0';
42
  }
43
  }
44
  }
119
 
120
  }
121
 
122
+ }
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: CMS, custom field, custom fields, custom post type, custom post types, fie
5
  License: GPLv2
6
  Requires at least: 3.4
7
  Tested up to: 4.2.2
8
- Stable tag: 1.7.5
9
 
10
  The complete and reliable plugin for managing custom post types, custom taxonomies and custom fields.
11
 
@@ -155,6 +155,11 @@ Additionally, Types is the only plugin that lets you define parent/child relatio
155
 
156
  == Changelog ==
157
 
 
 
 
 
 
158
  = 1.7.5 =
159
 
160
  * Release date: 2015-07-15
5
  License: GPLv2
6
  Requires at least: 3.4
7
  Tested up to: 4.2.2
8
+ Stable tag: 1.7.6
9
 
10
  The complete and reliable plugin for managing custom post types, custom taxonomies and custom fields.
11
 
155
 
156
  == Changelog ==
157
 
158
+ = 1.7.6 =
159
+
160
+ * Release date: 2015-07-20
161
+ * Change Installer version to 1.6.4 - to reduce load time and avoid to much update requests.
162
+
163
  = 1.7.5 =
164
 
165
  * Release date: 2015-07-15
wpcf.php CHANGED
@@ -5,7 +5,7 @@
5
  Description: Define custom post types, custom taxonomies and custom fields.
6
  Author: OnTheGoSystems
7
  Author URI: http://www.onthegosystems.com
8
- Version: 1.7.5
9
  */
10
  /**
11
  *
@@ -16,7 +16,7 @@ if ( !defined( 'WPCF_VERSION' ) ) {
16
  /**
17
  * make sure that WPCF_VERSION in embedded/bootstrap.php is the same!
18
  */
19
- define( 'WPCF_VERSION', '1.7.5' );
20
  }
21
 
22
  define( 'WPCF_REPOSITORY', 'http://api.wp-types.com/' );
5
  Description: Define custom post types, custom taxonomies and custom fields.
6
  Author: OnTheGoSystems
7
  Author URI: http://www.onthegosystems.com
8
+ Version: 1.7.6
9
  */
10
  /**
11
  *
16
  /**
17
  * make sure that WPCF_VERSION in embedded/bootstrap.php is the same!
18
  */
19
+ define( 'WPCF_VERSION', '1.7.6' );
20
  }
21
 
22
  define( 'WPCF_REPOSITORY', 'http://api.wp-types.com/' );