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

Version Description

  • Added filter 'wck_extra_field_attributes' which with you can add extra attributes to fields
  • Fixed the start page css
  • Fixed small compatibility issues
Download this release

Release Info

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

Code changes from version 2.1.2 to 2.1.3

css/wck-sas.css CHANGED
@@ -47,3 +47,13 @@
47
  background:#eeffe0;
48
  border-color:#4dcc00;
49
  }
 
 
 
 
 
 
 
 
 
 
47
  background:#eeffe0;
48
  border-color:#4dcc00;
49
  }
50
+
51
+ .wck_page_sas-page #poststuff .changelog h2{
52
+ font-size:1.4em;
53
+ padding-left:0;
54
+ }
55
+
56
+ .wck_page_sas-page .about-wrap .feature-section p{
57
+ margin-right: 0;
58
+ margin-left: 0;
59
+ }
images/banner_trp.png ADDED
Binary file
images/pb-trp-cross-promotion.png ADDED
Binary file
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.4
9
- Stable tag: 2.1.2
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -139,6 +139,11 @@ Creating a taxonomy generally automatically creates a special query variable usi
139
  10. Taxonomy listing
140
 
141
  == Changelog ==
 
 
 
 
 
142
  = 2.1.2 =
143
  * Added multiple select field type
144
 
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.8.2
9
+ Stable tag: 2.1.3
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.3 =
143
+ * Added filter 'wck_extra_field_attributes' which with you can add extra attributes to fields
144
+ * Fixed the start page css
145
+ * Fixed small compatibility issues
146
+
147
  = 2.1.2 =
148
  * Added multiple select field type
149
 
wck-cfc.php CHANGED
@@ -754,6 +754,25 @@ if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) ) {
754
  }
755
  }
756
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
757
 
758
  /* Contextual Help */
759
  add_action('current_screen', 'wck_cfc_help');
754
  }
755
  }
756
 
757
+ /* add TranslatePress crosspromotion */
758
+ add_action('add_meta_boxes', 'wck_cfc_add_trp_side_box');
759
+ function wck_cfc_add_trp_side_box()
760
+ {
761
+ add_meta_box('wck-cfc-side-trp', __('TranslatePress', 'wck'), 'wck_cfc_side_box_trp', 'wck-meta-box', 'side', 'low');
762
+ }
763
+
764
+ function wck_cfc_side_box_trp()
765
+ {
766
+ ?>
767
+ <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img
768
+ src="<?php echo plugins_url('/images/banner_trp.png', __FILE__) ?>?v=1" width="254"
769
+ alt="TranslatePress"/></a>
770
+ <h4>Easily translate your entire WordPress website</h4>
771
+ <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank">Translate</a> your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.<br/><br/>
772
+ It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
773
+ <?php
774
+ }
775
+
776
 
777
  /* Contextual Help */
778
  add_action('current_screen', 'wck_cfc_help');
wck-cptc.php CHANGED
@@ -340,6 +340,25 @@ if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) ) {
340
  }
341
  }
342
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  /* Contextual Help */
344
  add_action('load-wck_page_cptc-page', 'wck_cptc_help');
345
 
340
  }
341
  }
342
 
343
+ /* add TranslatePress crosspromotion */
344
+ add_action('add_meta_boxes', 'wck_cptc_add_trp_side_box');
345
+ function wck_cptc_add_trp_side_box()
346
+ {
347
+ add_meta_box('wck-cptc-side-trp', __('TranslatePress', 'wck'), 'wck_cptc_side_box_trp', 'wck_page_cptc-page', 'side', 'low');
348
+ }
349
+
350
+ function wck_cptc_side_box_trp()
351
+ {
352
+ ?>
353
+ <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img
354
+ src="<?php echo plugins_url('/images/banner_trp.png', __FILE__) ?>?v=1" width="254"
355
+ alt="TranslatePress"/></a>
356
+ <h4>Easily translate your entire WordPress website</h4>
357
+ <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank">Translate</a> your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.<br/><br/>
358
+ It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
359
+ <?php
360
+ }
361
+
362
  /* Contextual Help */
363
  add_action('load-wck_page_cptc-page', 'wck_cptc_help');
364
 
wck-ctc.php CHANGED
@@ -359,6 +359,26 @@ if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) ) {
359
  <?php
360
  }
361
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  /* Contextual Help */
363
  add_action('load-wck_page_ctc-page', 'wck_ctc_help');
364
 
359
  <?php
360
  }
361
  }
362
+
363
+ /* add TranslatePress crosspromotion */
364
+ add_action('add_meta_boxes', 'wck_ctc_add_trp_side_box');
365
+ function wck_ctc_add_trp_side_box()
366
+ {
367
+ add_meta_box('wck-ctc-side-trp', __('TranslatePress', 'wck'), 'wck_ctc_side_box_trp', 'wck_page_ctc-page', 'side', 'low');
368
+ }
369
+
370
+ function wck_ctc_side_box_trp()
371
+ {
372
+ ?>
373
+ <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img
374
+ src="<?php echo plugins_url('/images/banner_trp.png', __FILE__) ?>?v=1" width="254"
375
+ alt="TranslatePress"/></a>
376
+ <h4>Easily translate your entire WordPress website</h4>
377
+ <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank">Translate</a> your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.<br/><br/>
378
+ It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
379
+ <?php
380
+ }
381
+
382
  /* Contextual Help */
383
  add_action('load-wck_page_ctc-page', 'wck_ctc_help');
384
 
wck-sas.php CHANGED
@@ -144,7 +144,25 @@ add_action( 'wck_after_meta_boxes', 'wck_sas_quickintro', 12);
144
  function wck_sas_quickintro($hook){
145
  if('wck_page_sas-page' == $hook ){
146
  ?>
147
- <div class="wrap about-wrap" style="clear:both;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  <div class="changelog">
149
  <h2><?php _e( 'Quick Start-Up Guide', 'wck' ); ?></h2>
150
 
144
  function wck_sas_quickintro($hook){
145
  if('wck_page_sas-page' == $hook ){
146
  ?>
147
+
148
+
149
+
150
+ <div class="wrap about-wrap" style="clear:both;">
151
+
152
+ <div>
153
+ <div style="float:right">
154
+ <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img src="<?php echo plugins_url( './images/pb-trp-cross-promotion.png', __FILE__ ); ?>" alt="TranslatePress Logo"/></a>
155
+ </div>
156
+ <div>
157
+ <h3>Easily translate your entire WordPress website</h3>
158
+ <p>Translate your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.</p>
159
+ <p>It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
160
+ <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" class="button" target="_blank">Find out how</a></p>
161
+
162
+ </div>
163
+ </div>
164
+
165
+
166
  <div class="changelog">
167
  <h2><?php _e( 'Quick Start-Up Guide', 'wck' ); ?></h2>
168
 
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.2
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.3
7
  Author URI: http://www.cozmoslabs.com
8
 
9
  License: GPL2
wordpress-creation-kit-api/fields/colorpicker.php CHANGED
@@ -5,10 +5,12 @@
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
 
 
 
8
  $element .= '<input type="text" name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" id="';
9
  if( !empty( $frontend_prefix ) )
10
  $element .= $frontend_prefix;
11
- $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"/>';
12
  $element .= '<script type="text/javascript">
13
  jQuery( document ).ready( function( $ ) {
14
  $( ".mb-colorpicker" ).iris( {} );
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
 
8
+ $extra_attr = apply_filters( 'wck_extra_field_attributes', '', $details, $meta );
9
+
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( {} );
wordpress-creation-kit-api/fields/currency select.php CHANGED
@@ -9,10 +9,12 @@ require_once( plugin_dir_path(__FILE__) . '../assets/currency/currency-select.ph
9
 
10
  $currencies = wck_get_currencies();
11
 
 
 
12
  $element .= '<select name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" id="';
13
  if( !empty( $frontend_prefix ) )
14
  $element .= $frontend_prefix;
15
- $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" class="mb-currency-select mb-field" >';
16
  $element .= '<option value="">'. __('...Choose', 'wck') .'</option>';
17
  if( !empty( $currencies ) ){
18
  foreach( $currencies as $currency_code => $currency_name ){
9
 
10
  $currencies = wck_get_currencies();
11
 
12
+ $extra_attr = apply_filters( 'wck_extra_field_attributes', '', $details, $meta );
13
+
14
  $element .= '<select name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" id="';
15
  if( !empty( $frontend_prefix ) )
16
  $element .= $frontend_prefix;
17
+ $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" class="mb-currency-select mb-field" '. $extra_attr .'>';
18
  $element .= '<option value="">'. __('...Choose', 'wck') .'</option>';
19
  if( !empty( $currencies ) ){
20
  foreach( $currencies as $currency_code => $currency_name ){
wordpress-creation-kit-api/fields/number.php CHANGED
@@ -5,6 +5,7 @@
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
 
 
8
 
9
  $element .= '<input type="number" name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" id="';
10
  if( !empty( $frontend_prefix ) )
@@ -13,5 +14,5 @@ $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title
13
  if( !empty( $details['readonly'] ) && $details['readonly'] )
14
  $element .= 'readonly="readonly"';
15
  $element .= ' step="'. ( ! empty( $details['number-step-value'] ) ? $details['number-step-value'] : 'any' ) .'" type="number" min="'. ( isset( $details['min-number-value'] ) ? $details['min-number-value'] : '' ) .'" max="'. ( isset( $details['max-number-value'] ) ? $details['max-number-value'] : '' ) .'"';
16
- $element .= ' value="'. esc_attr( $value ) .'" class="mb-number-input mb-field"/>';
17
  ?>
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
 
8
+ $extra_attr = apply_filters( 'wck_extra_field_attributes', '', $details, $meta );
9
 
10
  $element .= '<input type="number" name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" id="';
11
  if( !empty( $frontend_prefix ) )
14
  if( !empty( $details['readonly'] ) && $details['readonly'] )
15
  $element .= 'readonly="readonly"';
16
  $element .= ' step="'. ( ! empty( $details['number-step-value'] ) ? $details['number-step-value'] : 'any' ) .'" type="number" min="'. ( isset( $details['min-number-value'] ) ? $details['min-number-value'] : '' ) .'" max="'. ( isset( $details['max-number-value'] ) ? $details['max-number-value'] : '' ) .'"';
17
+ $element .= ' value="'. esc_attr( $value ) .'" class="mb-number-input mb-field" '.$extra_attr.'/>';
18
  ?>
wordpress-creation-kit-api/fields/select.php CHANGED
@@ -4,11 +4,13 @@
4
  * @param string $value Contains input value;
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
-
 
 
8
  $element .= '<select name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" id="';
9
  if( !empty( $frontend_prefix ) )
10
  $element .= $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="">'. __('...Choose', 'wck') .'</option>';
4
  * @param string $value Contains input value;
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
+
8
+ $extra_attr = apply_filters( 'wck_extra_field_attributes', '', $details, $meta );
9
+
10
  $element .= '<select 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 ) ) .'" class="mb-select mb-field" '.$extra_attr.'>';
14
 
15
  if( !empty( $details['default-option'] ) && $details['default-option'] )
16
  $element .= '<option value="">'. __('...Choose', 'wck') .'</option>';
wordpress-creation-kit-api/fields/text.php CHANGED
@@ -6,11 +6,13 @@
6
  * @return string $element input element html string. */
7
 
8
 
 
 
9
  $element .= '<input type="'. apply_filters( "wck_text_input_type_attribute_{$meta}_".Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ), 'text' ) .'" name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" id="';
10
  if( !empty( $frontend_prefix ) )
11
  $element .= $frontend_prefix;
12
  $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'"';
13
  if( !empty( $details['readonly'] ) && $details['readonly'] )
14
  $element .= 'readonly="readonly"';
15
- $element .= ' value="'. esc_attr( $value ) .'" class="mb-text-input mb-field"/>';
16
  ?>
6
  * @return string $element input element html string. */
7
 
8
 
9
+ $extra_attr = apply_filters( 'wck_extra_field_attributes', '', $details, $meta );
10
+
11
  $element .= '<input type="'. apply_filters( "wck_text_input_type_attribute_{$meta}_".Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ), 'text' ) .'" name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" id="';
12
  if( !empty( $frontend_prefix ) )
13
  $element .= $frontend_prefix;
14
  $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'"';
15
  if( !empty( $details['readonly'] ) && $details['readonly'] )
16
  $element .= 'readonly="readonly"';
17
+ $element .= ' value="'. esc_attr( $value ) .'" class="mb-text-input mb-field" '.$extra_attr.'/>';
18
  ?>
wordpress-creation-kit-api/fields/textarea.php CHANGED
@@ -5,6 +5,8 @@
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
 
 
 
8
  $number_of_rows = 5;
9
  if( !empty( $details['number_of_rows'] ) && is_numeric( trim( $details['number_of_rows'] ) ) )
10
  $number_of_rows = trim( $details['number_of_rows'] );
@@ -15,5 +17,5 @@ if( !empty( $frontend_prefix ) )
15
  $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" style="vertical-align:top;" class="mb-textarea mb-field"';
16
  if( !empty( $details['readonly'] ) && $details['readonly'] == true )
17
  $element .= ' readonly';
18
- $element .= '>'. esc_html( $value ) .'</textarea>';
19
  ?>
5
  * @param string $context Context where the function is used. Depending on it some actions are preformed.;
6
  * @return string $element input element html string. */
7
 
8
+ $extra_attr = apply_filters( 'wck_extra_field_attributes', '', $details, $meta );
9
+
10
  $number_of_rows = 5;
11
  if( !empty( $details['number_of_rows'] ) && is_numeric( trim( $details['number_of_rows'] ) ) )
12
  $number_of_rows = trim( $details['number_of_rows'] );
17
  $element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" style="vertical-align:top;" class="mb-textarea mb-field"';
18
  if( !empty( $details['readonly'] ) && $details['readonly'] == true )
19
  $element .= ' readonly';
20
+ $element .= ' '.$extra_attr.'>'. esc_html( $value ) .'</textarea>';
21
  ?>
wordpress-creation-kit-api/wck-fep/wck-fep.php CHANGED
@@ -991,7 +991,7 @@ function wck_fep_output_lilo_form(){
991
  $lilo_form .= '<input type="password" name="password" id="password" value="" /></li>';
992
  $lilo_form .= '<li><label for="confirm-password">'. __('Confirm Password:', 'wck').'</label>';
993
  $lilo_form .= '<input type="password" name="confirm-password" id="confirm-password" value="" /></li>';
994
- $lilo_form .= '<li><input type="submit" onclick="wckFepRegisterUser(\''. $nonce .'\')" name="register" id="register" value="Register" /></li>';
995
  $lilo_form .= '</ul>';
996
  $lilo_form .= '<a href="javascript:void(0)" id="wck-fep-back-to-login">'. __( 'Back to login.', 'wck' ) .'</a></div>';
997
  }
991
  $lilo_form .= '<input type="password" name="password" id="password" value="" /></li>';
992
  $lilo_form .= '<li><label for="confirm-password">'. __('Confirm Password:', 'wck').'</label>';
993
  $lilo_form .= '<input type="password" name="confirm-password" id="confirm-password" value="" /></li>';
994
+ $lilo_form .= '<li><input type="submit" onclick="wckFepRegisterUser(\''. $nonce .'\')" name="register" id="register" value="'. __('Register.', 'wck') .'" /></li>';
995
  $lilo_form .= '</ul>';
996
  $lilo_form .= '<a href="javascript:void(0)" id="wck-fep-back-to-login">'. __( 'Back to login.', 'wck' ) .'</a></div>';
997
  }