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

Version Description

  • Fixed a notice with default value in colorpicker field
  • Updated translation files
Download this release

Release Info

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

Code changes from version 2.1.9 to 2.2.0

readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: cozmoslabs, reflectionmedia, madalin.ungureanu, sareiodata, adispi
3
  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.4
7
- Stable tag: 2.1.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -137,6 +137,10 @@ Creating a taxonomy generally automatically creates a special query variable usi
137
  10. Taxonomy listing
138
 
139
  == Changelog ==
 
 
 
 
140
  = 2.1.9 =
141
  * Added 'rewrite' and 'rewrite slug' advanced options for custom taxonomy creator
142
  * Added a plugin notification class
3
  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.8
7
+ Stable tag: 2.2.0
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.2.0 =
141
+ * Fixed a notice with default value in colorpicker field
142
+ * Updated translation files
143
+
144
  = 2.1.9 =
145
  * Added 'rewrite' and 'rewrite slug' advanced options for custom taxonomy creator
146
  * Added a plugin notification class
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.9
7
  Author URI: http://www.cozmoslabs.com
8
  Text Domain: wck
9
  Domain Path: /languages
@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
 
29
  define( 'WCK_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
30
  define( 'WCK_PLUGIN_DIR_URL', plugin_dir_url( __FILE__ ) );
31
- define( 'WCK_PLUGIN_VERSION', '2.5.2' );
32
 
33
  /* ready for localization */
34
  $current_theme = wp_get_theme();
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.2.0
7
  Author URI: http://www.cozmoslabs.com
8
  Text Domain: wck
9
  Domain Path: /languages
28
 
29
  define( 'WCK_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
30
  define( 'WCK_PLUGIN_DIR_URL', plugin_dir_url( __FILE__ ) );
31
+ define( 'WCK_PLUGIN_VERSION', '2.5.3' );
32
 
33
  /* ready for localization */
34
  $current_theme = wp_get_theme();
wordpress-creation-kit-api/fields/colorpicker.php CHANGED
@@ -10,7 +10,7 @@ $extra_attr = apply_filters( 'wck_extra_field_attributes', '', $details, $meta )
10
  $element .= '<input type="text" name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" id="';
11
  if( !empty( $frontend_prefix ) )
12
  $element .= $frontend_prefix;
13
- $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" value="'. ( ! empty( $value ) ? esc_attr( $value ) : esc_attr( $details['default'] ) ) .'" data-default-color="'. ( ! empty( $details['default'] ) ? esc_attr( $details['default'] ) : '' ) .'" class="mb-colorpicker mb-field" '.$extra_attr.'/>';
14
  $element .= '<script type="text/javascript">
15
  jQuery( document ).ready( function( $ ) {
16
  $( ".mb-colorpicker" ).iris( {} );
10
  $element .= '<input type="text" name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" id="';
11
  if( !empty( $frontend_prefix ) )
12
  $element .= $frontend_prefix;
13
+ $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" value="'. esc_attr( $value ) .'" data-default-color="'. ( ! empty( $details['default'] ) ? esc_attr( $details['default'] ) : '' ) .'" class="mb-colorpicker mb-field" '.$extra_attr.'/>';
14
  $element .= '<script type="text/javascript">
15
  jQuery( document ).ready( function( $ ) {
16
  $( ".mb-colorpicker" ).iris( {} );
wordpress-creation-kit-api/wck-fep/wck-fep.php CHANGED
@@ -475,21 +475,26 @@ class WCK_FrontEnd_Posting extends Wordpress_Creation_Kit{
475
  default:
476
  /* take care of taxonomies */
477
  if( !empty( $this->args['taxonomies'] ) ){
 
478
  foreach( $this->args['taxonomies'] as $taxonomy ){
479
 
480
  if( $details['title'] == $taxonomy->label || $details['slug'] == $taxonomy->name ){
481
  $object_terms = wp_get_object_terms( $post->ID, $taxonomy->name );
482
 
483
  if(!empty($object_terms)){
484
- if(!is_wp_error( $object_terms )){
485
- foreach($object_terms as $term){
486
- $value[] = $term->name;
487
- }
488
 
489
- /* if not hyerarhical return string not array */
490
- if( !$taxonomy->hierarchical )
491
- $value = implode( ', ', $value );
492
- }
 
 
 
 
493
  }
494
  }
495
  }
475
  default:
476
  /* take care of taxonomies */
477
  if( !empty( $this->args['taxonomies'] ) ){
478
+ $tax_values = array();
479
  foreach( $this->args['taxonomies'] as $taxonomy ){
480
 
481
  if( $details['title'] == $taxonomy->label || $details['slug'] == $taxonomy->name ){
482
  $object_terms = wp_get_object_terms( $post->ID, $taxonomy->name );
483
 
484
  if(!empty($object_terms)){
485
+ if(!is_wp_error( $object_terms )){
486
+ foreach($object_terms as $term){
487
+ $tax_values[] = $term->name;
488
+ }
489
 
490
+ /* if not hyerarhical return string not array */
491
+ if( !$taxonomy->hierarchical ){
492
+ $value = implode( ', ', $tax_values );
493
+ }
494
+ else{
495
+ $value = $tax_values;
496
+ }
497
+ }
498
  }
499
  }
500
  }