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

Version Description

  • Fixed typo from 'Chose' to 'Choose'
Download this release

Release Info

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

Code changes from version 1.1.8 to 1.1.9

readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: custom fields, custom field, wordpress custom fields, advanced custom fiel
6
 
7
  Requires at least: 3.1
8
  Tested up to: 4.4.1
9
- Stable tag: 1.1.8
10
 
11
  A must have tool for creating custom fields, custom post types and taxonomies, fast and without any programming knowledge.
12
 
@@ -141,6 +141,9 @@ Creating a taxonomy generally automatically creates a special query variable usi
141
  10. Taxonomy listing
142
 
143
  == Changelog ==
 
 
 
144
  = 1.1.8 =
145
  * We now allow Custom Post Types and Custom Taxonomies to be available via REST API by adding 'show_in_rest' attribute
146
 
6
 
7
  Requires at least: 3.1
8
  Tested up to: 4.4.1
9
+ Stable tag: 1.1.9
10
 
11
  A must have tool for creating custom fields, custom post types and taxonomies, fast and without any programming knowledge.
12
 
141
  10. Taxonomy listing
142
 
143
  == Changelog ==
144
+ = 1.1.9 =
145
+ * Fixed typo from 'Chose' to 'Choose'
146
+
147
  = 1.1.8 =
148
  * We now allow Custom Post Types and Custom Taxonomies to be available via REST API by adding 'show_in_rest' attribute
149
 
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: 1.1.8
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: 1.1.9
7
  Author URI: http://www.cozmoslabs.com
8
 
9
  License: GPL2
wordpress-creation-kit-api/fields/select.php CHANGED
@@ -11,7 +11,7 @@ if( !empty( $frontend_prefix ) )
11
  $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" class="mb-select mb-field" >';
12
 
13
  if( !empty( $details['default-option'] ) && $details['default-option'] )
14
- $element .= '<option value="">'. __('...Chose', 'wck') .'</option>';
15
 
16
  $field_name = Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details );
17
 
11
  $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" class="mb-select mb-field" >';
12
 
13
  if( !empty( $details['default-option'] ) && $details['default-option'] )
14
+ $element .= '<option value="">'. __('...Choose', 'wck') .'</option>';
15
 
16
  $field_name = Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details );
17
 
wordpress-creation-kit-api/wck-fep/wck-fep.php CHANGED
@@ -539,13 +539,46 @@ class WCK_FrontEnd_Posting extends Wordpress_Creation_Kit{
539
 
540
  $wck_fep_new_post = array(
541
  'ID' => $post_ID,
542
- 'post_title' => $values['post-title'],
543
  'post_content' => $values['post-content'],
544
  'post_excerpt' => $values['post-excerpt'],
545
  'post_type' => $this->args['post_type']
546
  );
547
-
548
- /* post status */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
549
  if( $this->args['admin_approval'] == 'yes' )
550
  $wck_fep_new_post['post_status'] = 'draft';
551
  else
539
 
540
  $wck_fep_new_post = array(
541
  'ID' => $post_ID,
 
542
  'post_content' => $values['post-content'],
543
  'post_excerpt' => $values['post-excerpt'],
544
  'post_type' => $this->args['post_type']
545
  );
546
+
547
+
548
+ if( !empty($values['post-title'] ) )
549
+ $wck_fep_new_post['post_title'] = wp_strip_all_tags($values['post-title']);
550
+ else {
551
+ if( !empty( $action_type ) && $action_type == 'edit' )
552
+ $wck_fep_new_post['post_title'] = get_the_title( $post_ID );
553
+ else
554
+ $wck_fep_new_post['post_title'] = '';
555
+ }
556
+
557
+ if( !empty($values['post-content'] ) )
558
+ $wck_fep_new_post['post_content'] = wp_strip_all_tags($values['post-content']);
559
+ else {
560
+ if( !empty( $action_type ) && $action_type == 'edit' ) {
561
+ $post_obj = get_post( $post_ID );
562
+ $wck_fep_new_post['post_content'] = $post_obj->post_content;
563
+ }
564
+ else
565
+ $wck_fep_new_post['post_content'] = '';
566
+ }
567
+
568
+ if( !empty($values['post-excerpt'] ) )
569
+ $wck_fep_new_post['post_excerpt'] = wp_strip_all_tags($values['post-excerpt']);
570
+ else {
571
+ if( !empty( $action_type ) && $action_type == 'edit' ) {
572
+ $post_obj = get_post( $post_ID );
573
+ $wck_fep_new_post['post_excerpt'] = $post_obj->post_excerpt;
574
+ }
575
+ else
576
+ $wck_fep_new_post['post_excerpt'] = '';
577
+ }
578
+
579
+
580
+
581
+ /* post status */
582
  if( $this->args['admin_approval'] == 'yes' )
583
  $wck_fep_new_post['post_status'] = 'draft';
584
  else