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

Version Description

  • Release date: 2015-09-29
  • Fixed a problem with "Feature Image".
Download this release

Release Info

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

Code changes from version 1.8.6.1 to 1.8.6.2

embedded/bootstrap.php CHANGED
@@ -156,7 +156,7 @@ function wpcf_embedded_init() {
156
  // Define necessary constants if plugin is not present
157
  // This ones are skipped if used as embedded code!
158
  if ( !defined( 'WPCF_VERSION' ) ) {
159
- define( 'WPCF_VERSION', '1.8.6.1' );
160
  define( 'WPCF_META_PREFIX', 'wpcf-' );
161
  }
162
 
156
  // Define necessary constants if plugin is not present
157
  // This ones are skipped if used as embedded code!
158
  if ( !defined( 'WPCF_VERSION' ) ) {
159
+ define( 'WPCF_VERSION', '1.8.6.2' );
160
  define( 'WPCF_META_PREFIX', 'wpcf-' );
161
  }
162
 
embedded/classes/relationship/form-child.php CHANGED
@@ -126,6 +126,16 @@ class WPCF_Relationship_Child_Form
126
  }
127
  }
128
  unset($post_types);
 
 
 
 
 
 
 
 
 
 
129
  }
130
 
131
  function getParamsQuery() {
126
  }
127
  }
128
  unset($post_types);
129
+ /**
130
+ * wp_enqueue_media allways
131
+ */
132
+ add_action('admin_enqueue_scripts', array($this, 'wp_enqueue_media'), PHP_INT_MAX);
133
+ }
134
+
135
+ public function wp_enqueue_media()
136
+ {
137
+ global $post;
138
+ wp_enqueue_media(array('post' => $post->ID));
139
  }
140
 
141
  function getParamsQuery() {
embedded/functions.php CHANGED
@@ -652,10 +652,6 @@ function wpcf_field_enqueue_scripts($type)
652
 
653
  $cache[$config['id']] = $config;
654
 
655
- if ( isset($config['inherited_field_type']) && 'file' == $config['inherited_field_type']) {
656
- wp_enqueue_media();
657
- }
658
-
659
  return $config;
660
  } else {
661
  $wpcf->debug->errors['missing_type_config'][] = $type;
652
 
653
  $cache[$config['id']] = $config;
654
 
 
 
 
 
655
  return $config;
656
  } else {
657
  $wpcf->debug->errors['missing_type_config'][] = $type;
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.8.6.1
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.8.6.2
9
  */
10
  /**
11
  *
embedded/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.3
8
- Stable tag: 1.8.6.1
9
 
10
  The Embedded version lets you create custom types, taxonomies and fields for your theme or plugin, without requiring any plugin.
11
 
5
  License: GPLv2
6
  Requires at least: 3.4
7
  Tested up to: 4.3
8
+ Stable tag: 1.8.6.2
9
 
10
  The Embedded version lets you create custom types, taxonomies and fields for your theme or plugin, without requiring any plugin.
11
 
embedded/toolset/toolset-common/toolset-forms/classes/class.entry.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once dirname(__FILE__).'/class.field_factory.php';
3
+
4
+ /**
5
+ * Entry Field.
6
+ *
7
+ * Class for entry type object.
8
+ *
9
+ * @since x.x.x
10
+ *
11
+ */
12
+ class WPToolset_Field_Entry extends FieldFactory
13
+ {
14
+ /**
15
+ * Setup metaform.
16
+ *
17
+ * Setup metaform for field type "entry".
18
+ *
19
+ * @since x.x.x
20
+ *
21
+ * @return array metaform configuration for field "entry".
22
+ */
23
+
24
+ public function metaform()
25
+ {
26
+ /**
27
+ * add special class to hanfle select2
28
+ */
29
+ $attributes = $this->getAttr();
30
+ if ( isset($attributes['class']) ) {
31
+ $attributes['class'] .= ' ';
32
+ } else {
33
+ $attributes['class'] = '';
34
+ }
35
+ $attributes['class'] .= 'js-wpcf-entry-select2';
36
+ /**
37
+ * setup post type
38
+ */
39
+ $attributes['data-post-type'] = 'post';
40
+ $data = $this->getData();
41
+ if ( isset( $data['post_type'])) {
42
+ $attributes['data-post-type'] = $data['post_type'];
43
+ }
44
+ $attributes['data-nonce'] = wp_create_nonce('wpcf_entry_search');
45
+
46
+ $metaform = array();
47
+ $metaform[] = array(
48
+ '#type' => 'textfield',
49
+ '#title' => $this->getTitle(),
50
+ '#description' => $this->getDescription(),
51
+ '#name' => $this->getName(),
52
+ '#value' => $this->getValue(),
53
+ '#validate' => $this->getValidationData(),
54
+ '#repetitive' => $this->isRepetitive(),
55
+ '#attributes' => $attributes,
56
+ 'wpml_action' => $this->getWPMLAction(),
57
+ );
58
+ return $metaform;
59
+ }
60
+
61
+ }
embedded/toolset/toolset-common/toolset-forms/classes/class.types.php CHANGED
@@ -25,6 +25,7 @@ class WPToolset_Types
25
  */
26
  static function filterField($field, $post_id = null, $_post_wpcf = array())
27
  {
 
28
  // Get field settings (as when using get_option('wpcf-fields') from DB)
29
  $field = self::getConfig( $field );
30
  if ( is_null( $field ) ) return array();
@@ -135,6 +136,12 @@ class WPToolset_Types
135
  }
136
  }
137
  break;
 
 
 
 
 
 
138
  }
139
  // Radio adjust type name because form_factory class name contains 'Radios'
140
  if ( $field['type'] == 'radio' ) {
25
  */
26
  static function filterField($field, $post_id = null, $_post_wpcf = array())
27
  {
28
+
29
  // Get field settings (as when using get_option('wpcf-fields') from DB)
30
  $field = self::getConfig( $field );
31
  if ( is_null( $field ) ) return array();
136
  }
137
  }
138
  break;
139
+ case 'entry':
140
+ $_field['post_type'] = 'post';
141
+ if ( isset($field['data']['post_type']) ) {
142
+ $_field['post_type'] = $field['data']['post_type'];
143
+ }
144
+ break;
145
  }
146
  // Radio adjust type name because form_factory class name contains 'Radios'
147
  if ( $field['type'] == 'radio' ) {
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.3
8
- Stable tag: 1.8.6.1
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.8.6.1 =
159
 
160
  * Release date: 2015-09-28
5
  License: GPLv2
6
  Requires at least: 3.4
7
  Tested up to: 4.3
8
+ Stable tag: 1.8.6.2
9
 
10
  The complete and reliable plugin for managing custom post types, custom taxonomies and custom fields.
11
 
155
 
156
  == Changelog ==
157
 
158
+ = 1.8.6.2 =
159
+
160
+ * Release date: 2015-09-29
161
+ * Fixed a problem with "Feature Image".
162
+
163
  = 1.8.6.1 =
164
 
165
  * Release date: 2015-09-28
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.8.6.1
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.8.6.1' );
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.8.6.2
9
  */
10
  /**
11
  *
16
  /**
17
  * make sure that WPCF_VERSION in embedded/bootstrap.php is the same!
18
  */
19
+ define( 'WPCF_VERSION', '1.8.6.2' );
20
  }
21
 
22
  define( 'WPCF_REPOSITORY', 'http://api.wp-types.com/' );