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

Version Description

  • Added seamless display mode option to Custom Fields Creator boxes
Download this release

Release Info

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

Code changes from version 2.1.0 to 2.1.1

readme.txt CHANGED
@@ -5,8 +5,8 @@ Donate link: http://www.cozmoslabs.com/wordpress-creation-kit/
5
  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
6
 
7
  Requires at least: 3.1
8
- Tested up to: 4.7.3
9
- Stable tag: 2.1.0
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -139,6 +139,9 @@ Creating a taxonomy generally automatically creates a special query variable usi
139
  10. Taxonomy listing
140
 
141
  == Changelog ==
 
 
 
142
  = 2.1.0 =
143
  * All WCK meta keys are now protected so they do not appear in WordPress Custom Fields box which fixes some issues
144
  * We now can translate WCK labels with string translation in WPML (this includes Front end Posting labels)
5
  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
6
 
7
  Requires at least: 3.1
8
+ Tested up to: 4.7.4
9
+ Stable tag: 2.1.1
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
139
  10. Taxonomy listing
140
 
141
  == Changelog ==
142
+ = 2.1.1 =
143
+ * Added seamless display mode option to Custom Fields Creator boxes
144
+
145
  = 2.1.0 =
146
  * All WCK meta keys are now protected so they do not appear in WordPress Custom Fields box which fixes some issues
147
  * We now can translate WCK labels with string translation in WPML (this includes Front end Posting labels)
wck-cfc.php CHANGED
@@ -134,6 +134,9 @@ function wck_cfc_create_box(){
134
  if( !empty( $templates ) )
135
  $cfc_box_args_fields[] = array( 'type' => 'select', 'title' => __( 'Page Template', 'wck' ), 'slug' => 'page-template', 'options' => $templates, 'default-option' => true, 'description' => __( 'If post type is "page" you can further select a page templete. The meta box will only appear on the page that has that selected page template.', 'wck' ) );
136
 
 
 
 
137
  /* set up the box arguments */
138
  $args = array(
139
  'metabox_id' => 'wck-cfc-args',
@@ -368,6 +371,9 @@ function wck_cfc_create_boxes_args(){
368
  if( !empty( $wck_cfc_arg['page-template'] ) )
369
  $box_args['page_template'] = $wck_cfc_arg['page-template'];
370
 
 
 
 
371
  $box_args['unserialize_fields'] = apply_filters( 'wck_cfc_unserialize_fields_'.$wck_cfc_arg['meta-name'], false );
372
 
373
  /* nested repeater arg for pro version only */
134
  if( !empty( $templates ) )
135
  $cfc_box_args_fields[] = array( 'type' => 'select', 'title' => __( 'Page Template', 'wck' ), 'slug' => 'page-template', 'options' => $templates, 'default-option' => true, 'description' => __( 'If post type is "page" you can further select a page templete. The meta box will only appear on the page that has that selected page template.', 'wck' ) );
136
 
137
+ /* added box style in version 2.4.4 */
138
+ $cfc_box_args_fields[] = array( 'type' => 'select', 'title' => __( 'Box Style', 'wck' ), 'slug' => 'box-style', 'options' => array( '%Default (WP meta-box)%default', '%Seamless (no meta-box)%seamless' ), 'default' => 'default', 'description' => __( 'If the fields should be in a meta-box or not', 'wck' ) );
139
+
140
  /* set up the box arguments */
141
  $args = array(
142
  'metabox_id' => 'wck-cfc-args',
371
  if( !empty( $wck_cfc_arg['page-template'] ) )
372
  $box_args['page_template'] = $wck_cfc_arg['page-template'];
373
 
374
+ if( !empty( $wck_cfc_arg['box-style'] ) )
375
+ $box_args['box_style'] = $wck_cfc_arg['box-style'];
376
+
377
  $box_args['unserialize_fields'] = apply_filters( 'wck_cfc_unserialize_fields_'.$wck_cfc_arg['meta-name'], false );
378
 
379
  /* nested repeater arg for pro version only */
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.0
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.1
7
  Author URI: http://www.cozmoslabs.com
8
 
9
  License: GPL2
wordpress-creation-kit-api/wck-fep/wck-fep.php CHANGED
@@ -476,8 +476,8 @@ class WCK_FrontEnd_Posting extends Wordpress_Creation_Kit{
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 ){
481
  $object_terms = wp_get_object_terms( $post->ID, $taxonomy->name );
482
 
483
  if(!empty($object_terms)){
@@ -659,7 +659,7 @@ class WCK_FrontEnd_Posting extends Wordpress_Creation_Kit{
659
  if( !empty( $this->args['taxonomies'] ) ){
660
  foreach( $this->args['taxonomies'] as $taxonomy ){
661
 
662
- $tax_names = $values[ Wordpress_Creation_Kit::wck_generate_slug( $taxonomy->label ) ];
663
 
664
  if( !empty( $tax_names ) ){
665
  $tax_names = explode( ',', $tax_names );
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)){
659
  if( !empty( $this->args['taxonomies'] ) ){
660
  foreach( $this->args['taxonomies'] as $taxonomy ){
661
 
662
+ $tax_names = $values[ Wordpress_Creation_Kit::wck_generate_slug( $taxonomy->label, array( 'slug' => $taxonomy->name ) ) ];
663
 
664
  if( !empty( $tax_names ) ){
665
  $tax_names = explode( ',', $tax_names );
wordpress-creation-kit-api/wordpress-creation-kit.css CHANGED
@@ -3,6 +3,16 @@
3
  height:0;
4
  }
5
 
 
 
 
 
 
 
 
 
 
 
6
  .mb-list-entry-fields li{
7
  margin-bottom:15px;
8
  clear:both;
3
  height:0;
4
  }
5
 
6
+ .wck-post-box.wck-no-box{
7
+ background: none;
8
+ box-shadow: none;
9
+ border: none;
10
+ }
11
+
12
+ .wck-post-box.wck-no-box > .button-link, .wck-post-box.wck-no-box > .hndle{
13
+ display:none;
14
+ }
15
+
16
  .mb-list-entry-fields li{
17
  margin-bottom:15px;
18
  clear:both;
wordpress-creation-kit-api/wordpress-creation-kit.php CHANGED
@@ -67,7 +67,8 @@ class Wordpress_Creation_Kit{
67
  'unserialize_fields' => false,
68
  'unserialize' => true,
69
  'sortable' => true,
70
- 'context' => 'post_meta'
 
71
  );
72
  private $args;
73
 
@@ -228,6 +229,10 @@ class Wordpress_Creation_Kit{
228
  /* Function used to add classes to the wck meta boxes */
229
  function wck_add_metabox_classes( $classes ){
230
  array_push($classes,'wck-post-box');
 
 
 
 
231
  return $classes;
232
  }
233
 
67
  'unserialize_fields' => false,
68
  'unserialize' => true,
69
  'sortable' => true,
70
+ 'context' => 'post_meta',
71
+ 'box_style' => 'default'
72
  );
73
  private $args;
74
 
229
  /* Function used to add classes to the wck meta boxes */
230
  function wck_add_metabox_classes( $classes ){
231
  array_push($classes,'wck-post-box');
232
+
233
+ if( $this->args['box_style'] == 'seamless' )
234
+ array_push($classes,'wck-no-box');
235
+
236
  return $classes;
237
  }
238