Custom Post Types and Custom Fields creator – WCK - Version 2.1.6

Version Description

  • Fixed a notice regarding the Custom Fields Creator introduced in the last version
Download this release

Release Info

Developer madalin.ungureanu
Plugin Icon 128x128 Custom Post Types and Custom Fields creator – WCK
Version 2.1.6
Comparing to
See all releases

Code changes from version 2.1.5 to 2.1.6

readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.cozmoslabs.com/wordpress-creation-kit/
4
  Tags: custom fields, custom field, wordpress custom fields, custom post type, custom post types, post types, repeater fields, meta box, metabox, custom taxonomy, custom fields creator, post meta
5
  Requires at least: 3.1
6
  Tested up to: 4.9.1
7
- Stable tag: 2.1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -137,6 +137,9 @@ Creating a taxonomy generally automatically creates a special query variable usi
137
  10. Taxonomy listing
138
 
139
  == Changelog ==
 
 
 
140
  = 2.1.5 =
141
  * Added a filter so we can add a metabox to multiple meta boxes: wck_filter_add_meta_box_screens
142
  * Fixed issue with PageBuilder from SiteOrigin plugin and CodeMirror
4
  Tags: custom fields, custom field, wordpress custom fields, custom post type, custom post types, post types, repeater fields, meta box, metabox, custom taxonomy, custom fields creator, post meta
5
  Requires at least: 3.1
6
  Tested up to: 4.9.1
7
+ Stable tag: 2.1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
137
  10. Taxonomy listing
138
 
139
  == Changelog ==
140
+ = 2.1.6 =
141
+ * Fixed a notice regarding the Custom Fields Creator introduced in the last version
142
+
143
  = 2.1.5 =
144
  * Added a filter so we can add a metabox to multiple meta boxes: wck_filter_add_meta_box_screens
145
  * Fixed issue with PageBuilder from SiteOrigin plugin and CodeMirror
wck.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WCK - Custom Fields and Custom Post Types Creator
4
  Description: WordPress Creation Kit consists of three tools that can help you create and maintain custom post types, custom taxonomies and most importantly, custom fields and metaboxes for your posts, pages or CPT's.
5
  Author: Cozmoslabs, Madalin Ungureanu, Cristian Antohe
6
- Version: 2.1.5
7
  Author URI: http://www.cozmoslabs.com
8
 
9
  License: GPL2
3
  Plugin Name: WCK - Custom Fields and Custom Post Types Creator
4
  Description: WordPress Creation Kit consists of three tools that can help you create and maintain custom post types, custom taxonomies and most importantly, custom fields and metaboxes for your posts, pages or CPT's.
5
  Author: Cozmoslabs, Madalin Ungureanu, Cristian Antohe
6
+ Version: 2.1.6
7
  Author URI: http://www.cozmoslabs.com
8
 
9
  License: GPL2
wordpress-creation-kit-api/wordpress-creation-kit.php CHANGED
@@ -170,12 +170,13 @@ class Wordpress_Creation_Kit{
170
  }
171
 
172
  if( $this->args['post_id'] == '' && $this->args['page_template'] == '' ){
 
173
  /* turn this into an array for wp 4.4.0 */
174
  global $wp_version;
175
- if( version_compare( $wp_version, '4.4.0', '>=' ) && !is_array( $this->args['post_type'] ) ) {
176
- $this->args['post_type'] = array($this->args['post_type']);
177
  }
178
- $screens = apply_filters( 'wck_filter_add_meta_box_screens', $this->args['post_type'] );
179
  add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $screens, $metabox_context, $metabox_priority, array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );
180
  /* add class to meta box */
181
  add_filter( "postbox_classes_".$this->args['post_type']."_".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );
170
  }
171
 
172
  if( $this->args['post_id'] == '' && $this->args['page_template'] == '' ){
173
+ $screens = $this->args['post_type'];
174
  /* turn this into an array for wp 4.4.0 */
175
  global $wp_version;
176
+ if( version_compare( $wp_version, '4.4.0', '>=' ) && !is_array( $screens ) ) {
177
+ $screens = array( $screens );
178
  }
179
+ $screens = apply_filters( 'wck_filter_add_meta_box_screens', $screens );
180
  add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $screens, $metabox_context, $metabox_priority, array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );
181
  /* add class to meta box */
182
  add_filter( "postbox_classes_".$this->args['post_type']."_".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );