Version Description
- Added Heading field type
- Added Colorpicker field type
- Added Currency field type
- Added number of rows and readonly options to the textarea field
- Added error notice for users with a php version lower than 5.3.0 on the settings page
Download this release
Release Info
Developer | madalin.ungureanu |
Plugin | Custom Post Types and Custom Fields creator – WCK |
Version | 1.2.7 |
Comparing to | |
See all releases |
Code changes from version 1.2.6 to 1.2.7
- css/wck-cfc.css +13 -3
- js/wck-cfc.js +40 -7
- readme.txt +10 -3
- wck-cfc.php +11 -3
- wck-sas.php +8 -0
- wck.php +1 -1
- wordpress-creation-kit-api/assets/colorpicker/colorpicker.css +4 -0
- wordpress-creation-kit-api/assets/currency/currency-select.php +311 -0
- wordpress-creation-kit-api/fields/colorpicker.php +28 -0
- wordpress-creation-kit-api/fields/currency select.php +27 -0
- wordpress-creation-kit-api/fields/heading.php +10 -0
- wordpress-creation-kit-api/fields/textarea.php +10 -3
- wordpress-creation-kit-api/wck-fep/wck-fep.css +9 -1
- wordpress-creation-kit-api/wck-fep/wck-fep.php +7 -1
- wordpress-creation-kit-api/wordpress-creation-kit.css +0 -1
- wordpress-creation-kit-api/wordpress-creation-kit.php +49 -30
css/wck-cfc.css
CHANGED
@@ -1,18 +1,28 @@
|
|
1 |
-
#wck_cfc_fields .row-options, #wck_cfc_fields .row-attach-upload-to-post, #wck_cfc_fields .row-cpt{
|
2 |
display:none;
|
3 |
}
|
4 |
|
5 |
#container_wck_cfc_fields .row-options,
|
6 |
#container_wck_cfc_fields .row-attach-upload-to-post,
|
7 |
-
#container_wck_cfc_fields .row-cpt
|
|
|
|
|
8 |
display:none;
|
9 |
}
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
#container_wck_cfc_fields .element_type_cpt-select .row-cpt,
|
12 |
#container_wck_cfc_fields .element_type_checkbox .row-options,
|
13 |
#container_wck_cfc_fields .element_type_select .row-options,
|
14 |
#container_wck_cfc_fields .element_type_radio .row-options,
|
15 |
-
#container_wck_cfc_fields .element_type_upload .row-attach-upload-to-post
|
|
|
|
|
16 |
display:block;
|
17 |
}
|
18 |
|
1 |
+
#wck_cfc_fields .row-options, #wck_cfc_fields .row-attach-upload-to-post, #wck_cfc_fields .row-cpt, #wck_cfc_fields .row-number-of-rows, #wck_cfc_fields .row-readonly{
|
2 |
display:none;
|
3 |
}
|
4 |
|
5 |
#container_wck_cfc_fields .row-options,
|
6 |
#container_wck_cfc_fields .row-attach-upload-to-post,
|
7 |
+
#container_wck_cfc_fields .row-cpt,
|
8 |
+
#container_wck_cfc_fields .row-number-of-rows,
|
9 |
+
#container_wck_cfc_fields .row-readonly{
|
10 |
display:none;
|
11 |
}
|
12 |
|
13 |
+
#container_wck_cfc_fields .element_type_heading .row-required,
|
14 |
+
#container_wck_cfc_fields .element_type_heading .row-default-value,
|
15 |
+
#container_wck_cfc_fields .element_type_heading .slug-title {
|
16 |
+
display: none;
|
17 |
+
}
|
18 |
+
|
19 |
#container_wck_cfc_fields .element_type_cpt-select .row-cpt,
|
20 |
#container_wck_cfc_fields .element_type_checkbox .row-options,
|
21 |
#container_wck_cfc_fields .element_type_select .row-options,
|
22 |
#container_wck_cfc_fields .element_type_radio .row-options,
|
23 |
+
#container_wck_cfc_fields .element_type_upload .row-attach-upload-to-post,
|
24 |
+
#container_wck_cfc_fields .element_type_textarea .row-number-of-rows,
|
25 |
+
#container_wck_cfc_fields .element_type_textarea .row-readonly{
|
26 |
display:block;
|
27 |
}
|
28 |
|
js/wck-cfc.js
CHANGED
@@ -1,7 +1,4 @@
|
|
1 |
jQuery(function(){
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
jQuery(document).on( 'change', '#wck_cfc_fields #field-type', function () {
|
6 |
value = jQuery(this).val();
|
7 |
|
@@ -24,7 +21,26 @@ jQuery(function(){
|
|
24 |
}
|
25 |
else{
|
26 |
jQuery( '#wck_cfc_fields .row-cpt' ).hide();
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
jQuery(document).on( 'change', '#container_wck_cfc_fields #field-type', function () {
|
30 |
value = jQuery(this).val();
|
@@ -47,7 +63,24 @@ jQuery(function(){
|
|
47 |
}
|
48 |
else{
|
49 |
jQuery(this).parent().parent().parent().children(".row-cpt").hide();
|
50 |
-
}
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
});
|
1 |
jQuery(function(){
|
|
|
|
|
|
|
2 |
jQuery(document).on( 'change', '#wck_cfc_fields #field-type', function () {
|
3 |
value = jQuery(this).val();
|
4 |
|
21 |
}
|
22 |
else{
|
23 |
jQuery( '#wck_cfc_fields .row-cpt' ).hide();
|
24 |
+
}
|
25 |
+
|
26 |
+
if( value == 'textarea' ){
|
27 |
+
jQuery( '#wck_cfc_fields .row-number-of-rows' ).show();
|
28 |
+
jQuery( '#wck_cfc_fields .row-readonly' ).show();
|
29 |
+
}
|
30 |
+
else{
|
31 |
+
jQuery( '#wck_cfc_fields .row-number-of-rows' ).hide();
|
32 |
+
jQuery( '#wck_cfc_fields .row-readonly' ).hide();
|
33 |
+
}
|
34 |
+
|
35 |
+
if( value == 'heading' ) {
|
36 |
+
jQuery( '#wck_cfc_fields .row-required' ).hide();
|
37 |
+
jQuery( '#wck_cfc_fields .row-default-value' ).hide();
|
38 |
+
} else {
|
39 |
+
jQuery( '#wck_cfc_fields .row-required' ).show();
|
40 |
+
jQuery( '#wck_cfc_fields .row-default-value' ).show();
|
41 |
+
}
|
42 |
+
|
43 |
+
});
|
44 |
|
45 |
jQuery(document).on( 'change', '#container_wck_cfc_fields #field-type', function () {
|
46 |
value = jQuery(this).val();
|
63 |
}
|
64 |
else{
|
65 |
jQuery(this).parent().parent().parent().children(".row-cpt").hide();
|
66 |
+
}
|
67 |
+
|
68 |
+
if( value == 'textarea' ){
|
69 |
+
jQuery(this).parent().parent().parent().children(".row-number-of-rows").show();
|
70 |
+
jQuery(this).parent().parent().parent().children(".row-readonly").show();
|
71 |
+
}
|
72 |
+
else{
|
73 |
+
jQuery(this).parent().parent().parent().children(".row-number-of-rows").hide();
|
74 |
+
jQuery(this).parent().parent().parent().children(".row-readonly").hide();
|
75 |
+
}
|
76 |
+
|
77 |
+
if( value == 'heading' ) {
|
78 |
+
jQuery( this ).parent().parent().parent().children( ".row-required" ).hide();
|
79 |
+
jQuery( this ).parent().parent().parent().children( ".row-default-value" ).hide();
|
80 |
+
} else {
|
81 |
+
jQuery( this ).parent().parent().parent().children( ".row-required" ).show();
|
82 |
+
jQuery( this ).parent().parent().parent().children( ".row-default-value" ).show();
|
83 |
+
}
|
84 |
+
|
85 |
+
});
|
86 |
});
|
readme.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
=== WCK - Custom
|
2 |
|
3 |
Contributors: cozmoslabs, reflectionmedia, madalin.ungureanu, sareiodata, adispiac
|
4 |
Donate link: http://www.cozmoslabs.com/wordpress-creation-kit/
|
5 |
-
Tags: custom fields, custom field, wordpress custom fields,
|
6 |
|
7 |
Requires at least: 3.1
|
8 |
Tested up to: 4.5.2
|
9 |
-
Stable tag: 1.2.
|
10 |
|
11 |
A must have tool for creating custom fields, custom post types and taxonomies, fast and without any programming knowledge.
|
12 |
|
@@ -143,6 +143,13 @@ Creating a taxonomy generally automatically creates a special query variable usi
|
|
143 |
10. Taxonomy listing
|
144 |
|
145 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
= 1.2.6 =
|
147 |
* Small change in saving single metaboxes
|
148 |
* Fixed a possible conflict with ACF Pro
|
1 |
+
=== WCK - Custom Post Types and Custom Fields Creator ===
|
2 |
|
3 |
Contributors: cozmoslabs, reflectionmedia, madalin.ungureanu, sareiodata, adispiac
|
4 |
Donate link: http://www.cozmoslabs.com/wordpress-creation-kit/
|
5 |
+
Tags: custom fields, custom field, wordpress custom fields, custom post type, custom 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.5.2
|
9 |
+
Stable tag: 1.2.7
|
10 |
|
11 |
A must have tool for creating custom fields, custom post types and taxonomies, fast and without any programming knowledge.
|
12 |
|
143 |
10. Taxonomy listing
|
144 |
|
145 |
== Changelog ==
|
146 |
+
= 1.2.7 =
|
147 |
+
* Added Heading field type
|
148 |
+
* Added Colorpicker field type
|
149 |
+
* Added Currency field type
|
150 |
+
* Added number of rows and readonly options to the textarea field
|
151 |
+
* Added error notice for users with a php version lower than 5.3.0 on the settings page
|
152 |
+
|
153 |
= 1.2.6 =
|
154 |
* Small change in saving single metaboxes
|
155 |
* Fixed a possible conflict with ACF Pro
|
wck-cfc.php
CHANGED
@@ -149,7 +149,7 @@ function wck_cfc_create_box(){
|
|
149 |
new Wordpress_Creation_Kit( $args );
|
150 |
|
151 |
/* set up field types */
|
152 |
-
$field_types = array( 'text', 'textarea', 'select', 'checkbox', 'radio', 'upload', 'wysiwyg editor', 'datepicker', 'country select', 'user select', 'cpt select' );
|
153 |
$field_types = apply_filters( 'wck_field_types', $field_types );
|
154 |
|
155 |
/* setup post types */
|
@@ -164,7 +164,9 @@ function wck_cfc_create_box(){
|
|
164 |
array( 'type' => 'select', 'title' => __( 'CPT', 'wck' ), 'slug' => 'cpt', 'options' => $post_types, 'default' => 'post', 'description' => __( 'Select what custom post type should be used in the CPT Select.', 'wck' ) ),
|
165 |
array( 'type' => 'text', 'title' => __( 'Default Value', 'wck' ), 'slug' => 'default-value', 'description' => __( 'Default value of the field. For Checkboxes if there are multiple values separate them with a ",". For an Upload field input an attachment id.', 'wck' ) ),
|
166 |
array( 'type' => 'text', 'title' => __( 'Options', 'wck' ), 'slug' => 'options', 'description' => __( 'Options for field types "select", "checkbox" and "radio". For multiple options separate them with a ",". You can use the following structure if you want the label to be different from the value: %LabelOne%valueone,%LabelTwo%valuetwo,%LabelThree%valuethree', 'wck' ) ),
|
167 |
-
array( 'type' => 'checkbox', 'title' => __( 'Attach upload to post', 'wck' ), 'slug' => 'attach-upload-to-post', 'description' => __( 'Uploads will be attached to the post if this is checked', 'wck' ), 'options' => array( 'yes' ), 'default' => 'yes' )
|
|
|
|
|
168 |
) );
|
169 |
|
170 |
|
@@ -263,6 +265,12 @@ function wck_cfc_create_boxes_args(){
|
|
263 |
if( !empty( $wck_cfc_field['attach-upload-to-post'] ) )
|
264 |
$fields_inner_array['attach_to_post'] = $wck_cfc_field['attach-upload-to-post'] == 'yes' ? true : false;
|
265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
$fields_array[] = $fields_inner_array;
|
267 |
}
|
268 |
}
|
@@ -645,7 +653,7 @@ add_filter( 'wck_field_types', 'wck_cfc_filter_field_types' );
|
|
645 |
function wck_cfc_filter_field_types( $field_types ){
|
646 |
$wck_premium_update = WCK_PLUGIN_DIR.'/update/';
|
647 |
if ( !file_exists ($wck_premium_update . 'update-checker.php'))
|
648 |
-
$field_types = array( 'text', 'textarea', 'select', 'checkbox', 'radio', 'upload', 'wysiwyg editor' );
|
649 |
|
650 |
return $field_types;
|
651 |
}
|
149 |
new Wordpress_Creation_Kit( $args );
|
150 |
|
151 |
/* set up field types */
|
152 |
+
$field_types = array( 'heading', 'text', 'textarea', 'select', 'checkbox', 'radio', 'upload', 'wysiwyg editor', 'datepicker', 'colorpicker', 'country select', 'user select', 'cpt select', 'currency select' );
|
153 |
$field_types = apply_filters( 'wck_field_types', $field_types );
|
154 |
|
155 |
/* setup post types */
|
164 |
array( 'type' => 'select', 'title' => __( 'CPT', 'wck' ), 'slug' => 'cpt', 'options' => $post_types, 'default' => 'post', 'description' => __( 'Select what custom post type should be used in the CPT Select.', 'wck' ) ),
|
165 |
array( 'type' => 'text', 'title' => __( 'Default Value', 'wck' ), 'slug' => 'default-value', 'description' => __( 'Default value of the field. For Checkboxes if there are multiple values separate them with a ",". For an Upload field input an attachment id.', 'wck' ) ),
|
166 |
array( 'type' => 'text', 'title' => __( 'Options', 'wck' ), 'slug' => 'options', 'description' => __( 'Options for field types "select", "checkbox" and "radio". For multiple options separate them with a ",". You can use the following structure if you want the label to be different from the value: %LabelOne%valueone,%LabelTwo%valuetwo,%LabelThree%valuethree', 'wck' ) ),
|
167 |
+
array( 'type' => 'checkbox', 'title' => __( 'Attach upload to post', 'wck' ), 'slug' => 'attach-upload-to-post', 'description' => __( 'Uploads will be attached to the post if this is checked', 'wck' ), 'options' => array( 'yes' ), 'default' => 'yes' ),
|
168 |
+
array( 'type' => 'text', 'title' => __( 'Number of rows', 'wck' ), 'slug' => 'number-of-rows', 'description' => __( 'Number of rows for the textarea', 'wck' ), 'default' => '5' ),
|
169 |
+
array( 'type' => 'select', 'title' => __( 'Readonly', 'wck' ), 'slug' => 'readonly', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the textarea is readonly or not', 'wck' ) ),
|
170 |
) );
|
171 |
|
172 |
|
265 |
if( !empty( $wck_cfc_field['attach-upload-to-post'] ) )
|
266 |
$fields_inner_array['attach_to_post'] = $wck_cfc_field['attach-upload-to-post'] == 'yes' ? true : false;
|
267 |
|
268 |
+
if( !empty( $wck_cfc_field['number-of-rows'] ) )
|
269 |
+
$fields_inner_array['number_of_rows'] = trim( $wck_cfc_field['number-of-rows'] );
|
270 |
+
|
271 |
+
if( !empty( $wck_cfc_field['readonly'] ) )
|
272 |
+
$fields_inner_array['readonly'] = $wck_cfc_field['readonly'] == 'true' ? true : false;
|
273 |
+
|
274 |
$fields_array[] = $fields_inner_array;
|
275 |
}
|
276 |
}
|
653 |
function wck_cfc_filter_field_types( $field_types ){
|
654 |
$wck_premium_update = WCK_PLUGIN_DIR.'/update/';
|
655 |
if ( !file_exists ($wck_premium_update . 'update-checker.php'))
|
656 |
+
$field_types = array( 'text', 'textarea', 'select', 'checkbox', 'radio', 'upload', 'wysiwyg editor', 'heading', 'colorpicker', 'currency select' );
|
657 |
|
658 |
return $field_types;
|
659 |
}
|
wck-sas.php
CHANGED
@@ -90,6 +90,14 @@ function wck_sas_welcome($hook){
|
|
90 |
$default_plugin_headers = get_plugin_data($plugin_path);
|
91 |
$plugin_name = $default_plugin_headers['Name'];
|
92 |
$plugin_version = $default_plugin_headers['Version'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
?>
|
94 |
<div class="wrap about-wrap">
|
95 |
<h1><?php printf( __( 'Welcome to %s', 'wck' ), $plugin_name ); ?></h1>
|
90 |
$default_plugin_headers = get_plugin_data($plugin_path);
|
91 |
$plugin_name = $default_plugin_headers['Name'];
|
92 |
$plugin_version = $default_plugin_headers['Version'];
|
93 |
+
|
94 |
+
if( version_compare(PHP_VERSION, '5.3.0') < 0 ) { ?>
|
95 |
+
<div class="notice-error notice">
|
96 |
+
<p>
|
97 |
+
<?php _e('<strong>You are using a very old version of PHP</strong> (5.2.x or older) which has serious security and performance issues. Please ask your hoster to provide you with an upgrade path to 5.6 or 7.0','wck'); ?>
|
98 |
+
</p>
|
99 |
+
</div>
|
100 |
+
<?php }
|
101 |
?>
|
102 |
<div class="wrap about-wrap">
|
103 |
<h1><?php printf( __( 'Welcome to %s', 'wck' ), $plugin_name ); ?></h1>
|
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.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: 1.2.7
|
7 |
Author URI: http://www.cozmoslabs.com
|
8 |
|
9 |
License: GPL2
|
wordpress-creation-kit-api/assets/colorpicker/colorpicker.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
.iris-picker {
|
2 |
+
z-index: 999 !important;
|
3 |
+
position: absolute !important;
|
4 |
+
}
|
wordpress-creation-kit-api/assets/currency/currency-select.php
ADDED
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* Array with the currency ISO code and associated currency name
|
5 |
+
*
|
6 |
+
* @return array
|
7 |
+
*
|
8 |
+
*/
|
9 |
+
function wck_get_currencies() {
|
10 |
+
|
11 |
+
$currencies = array(
|
12 |
+
'ALL' => __( 'Albania Lek', 'wck' ),
|
13 |
+
'AFN' => __( 'Afghanistan Afghani', 'wck' ),
|
14 |
+
'ARS' => __( 'Argentina Peso', 'wck' ),
|
15 |
+
'AWG' => __( 'Aruba Guilder', 'wkc' ),
|
16 |
+
'AUD' => __( 'Australia Dollar', 'wck' ),
|
17 |
+
'AZN' => __( 'Azerbaijan New Manat', 'wck' ),
|
18 |
+
'BSD' => __( 'Bahamas Dollar', 'wck' ),
|
19 |
+
'BBD' => __( 'Barbados Dollar','wck' ),
|
20 |
+
'BDT' => __( 'Bangladeshi taka','wck' ),
|
21 |
+
'BYR' => __( 'Belarus Ruble','wck' ),
|
22 |
+
'BZD' => __( 'Belize Dollar','wck' ),
|
23 |
+
'BMD' => __( 'Bermuda Dollar','wck' ),
|
24 |
+
'BOB' => __( 'Bolivia Boliviano','wck' ),
|
25 |
+
'BAM' => __( 'Bosnia and Herzegovina Convertible Marka','wck' ),
|
26 |
+
'BWP' => __( 'Botswana Pula','wck' ),
|
27 |
+
'BGN' => __( 'Bulgaria Lev','wck' ),
|
28 |
+
'BRL' => __( 'Brazil Real','wck' ),
|
29 |
+
'BND' => __( 'Brunei Darussalam Dollar','wck' ),
|
30 |
+
'KHR' => __( 'Cambodia Riel','wck' ),
|
31 |
+
'CAD' => __( 'Canada Dollar','wck' ),
|
32 |
+
'KYD' => __( 'Cayman Islands Dollar','wck' ),
|
33 |
+
'CLP' => __( 'Chile Peso','wck' ),
|
34 |
+
'CNY' => __( 'China Yuan Renminbi','wck' ),
|
35 |
+
'COP' => __( 'Colombia Peso','wck' ),
|
36 |
+
'CRC' => __( 'Costa Rica Colon','wck' ),
|
37 |
+
'HRK' => __( 'Croatia Kuna','wck' ),
|
38 |
+
'CUP' => __( 'Cuba Peso','wck' ),
|
39 |
+
'CZK' => __( 'Czech Republic Koruna','wck' ),
|
40 |
+
'DKK' => __( 'Denmark Krone','wck' ),
|
41 |
+
'DOP' => __( 'Dominican Republic Peso','wck' ),
|
42 |
+
'XCD' => __( 'East Caribbean Dollar','wck' ),
|
43 |
+
'EGP' => __( 'Egypt Pound','wck' ),
|
44 |
+
'SVC' => __( 'El Salvador Colon','wck' ),
|
45 |
+
'EEK' => __( 'Estonia Kroon','wck' ),
|
46 |
+
'EUR' => __( 'Euro','wck' ),
|
47 |
+
'FKP' => __( 'Falkland Islands (Malvinas) Pound','wck' ),
|
48 |
+
'FJD' => __( 'Fiji Dollar','wck' ),
|
49 |
+
'GHC' => __( 'Ghana Cedis','wck' ),
|
50 |
+
'GIP' => __( 'Gibraltar Pound','wck' ),
|
51 |
+
'GTQ' => __( 'Guatemala Quetzal','wck' ),
|
52 |
+
'GGP' => __( 'Guernsey Pound','wck' ),
|
53 |
+
'GYD' => __( 'Guyana Dollar','wck' ),
|
54 |
+
'HNL' => __( 'Honduras Lempira','wck' ),
|
55 |
+
'HKD' => __( 'Hong Kong Dollar','wck' ),
|
56 |
+
'HUF' => __( 'Hungary Forint','wck' ),
|
57 |
+
'ISK' => __( 'Iceland Krona','wck' ),
|
58 |
+
'INR' => __( 'India Rupee','wck' ),
|
59 |
+
'IDR' => __( 'Indonesia Rupiah','wck' ),
|
60 |
+
'IRR' => __( 'Iran Rial','wck' ),
|
61 |
+
'IMP' => __( 'Isle of Man Pound','wck' ),
|
62 |
+
'ILS' => __( 'Israel Shekel','wck' ),
|
63 |
+
'JMD' => __( 'Jamaica Dollar','wck' ),
|
64 |
+
'JPY' => __( 'Japan Yen','wck' ),
|
65 |
+
'JEP' => __( 'Jersey Pound','wck' ),
|
66 |
+
'KZT' => __( 'Kazakhstan Tenge','wck' ),
|
67 |
+
'KPW' => __( 'Korea (North) Won','wck' ),
|
68 |
+
'KRW' => __( 'Korea (South) Won','wck' ),
|
69 |
+
'KGS' => __( 'Kyrgyzstan Som','wck' ),
|
70 |
+
'LAK' => __( 'Laos Kip','wck' ),
|
71 |
+
'LVL' => __( 'Latvia Lat','wck' ),
|
72 |
+
'LBP' => __( 'Lebanon Pound','wck' ),
|
73 |
+
'LRD' => __( 'Liberia Dollar','wck' ),
|
74 |
+
'LTL' => __( 'Lithuania Litas','wck' ),
|
75 |
+
'MKD' => __( 'Macedonia Denar','wck' ),
|
76 |
+
'MYR' => __( 'Malaysia Ringgit','wck' ),
|
77 |
+
'MUR' => __( 'Mauritius Rupee','wck' ),
|
78 |
+
'MXN' => __( 'Mexico Peso','wck' ),
|
79 |
+
'MNT' => __( 'Mongolia Tughrik','wck' ),
|
80 |
+
'MZN' => __( 'Mozambique Metical','wck' ),
|
81 |
+
'NAD' => __( 'Namibia Dollar','wck' ),
|
82 |
+
'NPR' => __( 'Nepal Rupee','wck' ),
|
83 |
+
'ANG' => __( 'Netherlands Antilles Guilder','wck' ),
|
84 |
+
'NZD' => __( 'New Zealand Dollar','wck' ),
|
85 |
+
'NIO' => __( 'Nicaragua Cordoba','wck' ),
|
86 |
+
'NGN' => __( 'Nigeria Naira','wck' ),
|
87 |
+
'NOK' => __( 'Norway Krone','wck' ),
|
88 |
+
'OMR' => __( 'Oman Rial', 'wck' ),
|
89 |
+
'PKR' => __( 'Pakistan Rupee', 'wck' ),
|
90 |
+
'PAB' => __( 'Panama Balboa', 'wck' ),
|
91 |
+
'PYG' => __( 'Paraguay Guarani', 'wck' ),
|
92 |
+
'PEN' => __( 'Peru Nuevo Sol', 'wck' ),
|
93 |
+
'PHP' => __( 'Philippines Peso', 'wck' ),
|
94 |
+
'PLN' => __( 'Poland Zloty', 'wck' ),
|
95 |
+
'QAR' => __( 'Qatar Riyal', 'wck' ),
|
96 |
+
'RON' => __( 'Romania New Leu', 'wck' ),
|
97 |
+
'RUB' => __( 'Russia Ruble', 'wck' ),
|
98 |
+
'SHP' => __( 'Saint Helena Pound', 'wck' ),
|
99 |
+
'SAR' => __( 'Saudi Arabia Riyal', 'wck' ),
|
100 |
+
'RSD' => __( 'Serbia Dinar', 'wck' ),
|
101 |
+
'SCR' => __( 'Seychelles Rupee', 'wck' ),
|
102 |
+
'SGD' => __( 'Singapore Dollar', 'wck' ),
|
103 |
+
'SBD' => __( 'Solomon Islands Dollar', 'wck' ),
|
104 |
+
'SOS' => __( 'Somalia Shilling', 'wck' ),
|
105 |
+
'ZAR' => __( 'South Africa Rand', 'wck' ),
|
106 |
+
'LKR' => __( 'Sri Lanka Rupee', 'wck' ),
|
107 |
+
'SEK' => __( 'Sweden Krona', 'wck' ),
|
108 |
+
'CHF' => __( 'Switzerland Franc', 'wck' ),
|
109 |
+
'SRD' => __( 'Suriname Dollar', 'wck' ),
|
110 |
+
'SYP' => __( 'Syria Pound', 'wck' ),
|
111 |
+
'TWD' => __( 'Taiwan New Dollar', 'wck' ),
|
112 |
+
'THB' => __( 'Thailand Baht', 'wck' ),
|
113 |
+
'TTD' => __( 'Trinidad and Tobago Dollar', 'wck' ),
|
114 |
+
'TRY' => __( 'Turkey Lira', 'wck' ),
|
115 |
+
'TRL' => __( 'Turkey Lira', 'wck' ),
|
116 |
+
'TVD' => __( 'Tuvalu Dollar', 'wck' ),
|
117 |
+
'UAH' => __( 'Ukraine Hryvna', 'wck' ),
|
118 |
+
'GBP' => __( 'United Kingdom Pound', 'wck' ),
|
119 |
+
'UGX' => __( 'Uganda Shilling', 'wck' ),
|
120 |
+
'USD' => __( 'US Dollar', 'wck' ),
|
121 |
+
'UYU' => __( 'Uruguay Peso', 'wck' ),
|
122 |
+
'UZS' => __( 'Uzbekistan Som', 'wck' ),
|
123 |
+
'VEF' => __( 'Venezuela Bolivar', 'wck' ),
|
124 |
+
'VND' => __( 'Viet Nam Dong', 'wck' ),
|
125 |
+
'YER' => __( 'Yemen Rial', 'wck' ),
|
126 |
+
'ZWD' => __( 'Zimbabwe Dollar', 'wck' )
|
127 |
+
);
|
128 |
+
|
129 |
+
return apply_filters( 'wck_get_currencies', $currencies );
|
130 |
+
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
+
/*
|
135 |
+
* Returns the currency symbol for a given currency code
|
136 |
+
*
|
137 |
+
* @param string $currency_code
|
138 |
+
*
|
139 |
+
* @return string
|
140 |
+
*
|
141 |
+
*/
|
142 |
+
function wck_get_currency_symbol( $currency_code ) {
|
143 |
+
|
144 |
+
$currency_symbols = array(
|
145 |
+
'AED' => 'د.إ', // ?
|
146 |
+
'AFN' => 'Af',
|
147 |
+
'ALL' => 'Lek',
|
148 |
+
'AMD' => '',
|
149 |
+
'ANG' => 'ƒ',
|
150 |
+
'AOA' => 'Kz', // ?
|
151 |
+
'ARS' => '$',
|
152 |
+
'AUD' => '$',
|
153 |
+
'AWG' => 'ƒ',
|
154 |
+
'AZN' => 'ман',
|
155 |
+
'BAM' => 'KM',
|
156 |
+
'BBD' => '$',
|
157 |
+
'BDT' => '৳', // ?
|
158 |
+
'BGN' => 'лв',
|
159 |
+
'BHD' => '.د.ب', // ?
|
160 |
+
'BIF' => 'FBu', // ?
|
161 |
+
'BMD' => '$',
|
162 |
+
'BND' => '$',
|
163 |
+
'BOB' => '$b',
|
164 |
+
'BRL' => 'R$',
|
165 |
+
'BSD' => '$',
|
166 |
+
'BTN' => 'Nu.', // ?
|
167 |
+
'BWP' => 'P',
|
168 |
+
'BYR' => 'p.',
|
169 |
+
'BZD' => 'BZ$',
|
170 |
+
'CAD' => '$',
|
171 |
+
'CDF' => 'FC',
|
172 |
+
'CHF' => 'CHF',
|
173 |
+
'CLF' => '', // ?
|
174 |
+
'CLP' => '$',
|
175 |
+
'CNY' => '¥',
|
176 |
+
'COP' => '$',
|
177 |
+
'CRC' => '₡',
|
178 |
+
'CUP' => '⃌',
|
179 |
+
'CVE' => '$', // ?
|
180 |
+
'CZK' => 'Kč',
|
181 |
+
'DJF' => 'Fdj', // ?
|
182 |
+
'DKK' => 'kr',
|
183 |
+
'DOP' => 'RD$',
|
184 |
+
'DZD' => 'دج', // ?
|
185 |
+
'EGP' => '£',
|
186 |
+
'ETB' => 'Br',
|
187 |
+
'EUR' => '€',
|
188 |
+
'FJD' => '$',
|
189 |
+
'FKP' => '£',
|
190 |
+
'GBP' => '£',
|
191 |
+
'GEL' => 'ლ', // ?
|
192 |
+
'GHS' => '¢',
|
193 |
+
'GIP' => '£',
|
194 |
+
'GMD' => 'D', // ?
|
195 |
+
'GNF' => 'FG', // ?
|
196 |
+
'GTQ' => 'Q',
|
197 |
+
'GYD' => '$',
|
198 |
+
'HKD' => '$',
|
199 |
+
'HNL' => 'L',
|
200 |
+
'HRK' => 'kn',
|
201 |
+
'HTG' => 'G', // ?
|
202 |
+
'HUF' => 'Ft',
|
203 |
+
'IDR' => 'Rp',
|
204 |
+
'ILS' => '₪',
|
205 |
+
'INR' => '₹',
|
206 |
+
'IQD' => 'ع.د', // ?
|
207 |
+
'IRR' => '﷼',
|
208 |
+
'ISK' => 'kr',
|
209 |
+
'JEP' => '£',
|
210 |
+
'JMD' => 'J$',
|
211 |
+
'JOD' => 'JD', // ?
|
212 |
+
'JPY' => '¥',
|
213 |
+
'KES' => 'KSh', // ?
|
214 |
+
'KGS' => 'лв',
|
215 |
+
'KHR' => '៛',
|
216 |
+
'KMF' => 'CF', // ?
|
217 |
+
'KPW' => '₩',
|
218 |
+
'KRW' => '₩',
|
219 |
+
'KWD' => 'د.ك', // ?
|
220 |
+
'KYD' => '$',
|
221 |
+
'KZT' => 'лв',
|
222 |
+
'LAK' => '₭',
|
223 |
+
'LBP' => '£',
|
224 |
+
'LKR' => '₨',
|
225 |
+
'LRD' => '$',
|
226 |
+
'LSL' => 'L', // ?
|
227 |
+
'LTL' => 'Lt',
|
228 |
+
'LVL' => 'Ls',
|
229 |
+
'LYD' => 'ل.د', // ?
|
230 |
+
'MAD' => 'د.م.', //?
|
231 |
+
'MDL' => 'L',
|
232 |
+
'MGA' => 'Ar', // ?
|
233 |
+
'MKD' => 'ден',
|
234 |
+
'MMK' => 'K',
|
235 |
+
'MNT' => '₮',
|
236 |
+
'MOP' => 'MOP$', // ?
|
237 |
+
'MRO' => 'UM', // ?
|
238 |
+
'MUR' => '₨', // ?
|
239 |
+
'MVR' => '.ރ', // ?
|
240 |
+
'MWK' => 'MK',
|
241 |
+
'MXN' => '$',
|
242 |
+
'MYR' => 'RM',
|
243 |
+
'MZN' => 'MT',
|
244 |
+
'NAD' => '$',
|
245 |
+
'NGN' => '₦',
|
246 |
+
'NIO' => 'C$',
|
247 |
+
'NOK' => 'kr',
|
248 |
+
'NPR' => '₨',
|
249 |
+
'NZD' => '$',
|
250 |
+
'OMR' => '﷼',
|
251 |
+
'PAB' => 'B/.',
|
252 |
+
'PEN' => 'S/.',
|
253 |
+
'PGK' => 'K', // ?
|
254 |
+
'PHP' => '₱',
|
255 |
+
'PKR' => '₨',
|
256 |
+
'PLN' => 'zł',
|
257 |
+
'PYG' => 'Gs',
|
258 |
+
'QAR' => '﷼',
|
259 |
+
'RON' => 'lei',
|
260 |
+
'RSD' => 'Дин.',
|
261 |
+
'RUB' => 'руб',
|
262 |
+
'RWF' => 'ر.س',
|
263 |
+
'SAR' => '﷼',
|
264 |
+
'SBD' => '$',
|
265 |
+
'SCR' => '₨',
|
266 |
+
'SDG' => '£', // ?
|
267 |
+
'SEK' => 'kr',
|
268 |
+
'SGD' => '$',
|
269 |
+
'SHP' => '£',
|
270 |
+
'SLL' => 'Le', // ?
|
271 |
+
'SOS' => 'S',
|
272 |
+
'SRD' => '$',
|
273 |
+
'STD' => 'Db', // ?
|
274 |
+
'SVC' => '$',
|
275 |
+
'SYP' => '£',
|
276 |
+
'SZL' => 'L', // ?
|
277 |
+
'THB' => '฿',
|
278 |
+
'TJS' => 'TJS', // ? TJS (guess)
|
279 |
+
'TMT' => 'm',
|
280 |
+
'TND' => 'د.ت',
|
281 |
+
'TOP' => 'T$',
|
282 |
+
'TRY' => '₤', // New Turkey Lira (old symbol used)
|
283 |
+
'TTD' => '$',
|
284 |
+
'TWD' => 'NT$',
|
285 |
+
'TZS' => '',
|
286 |
+
'UAH' => '₴',
|
287 |
+
'UGX' => 'USh',
|
288 |
+
'USD' => '$',
|
289 |
+
'UYU' => '$U',
|
290 |
+
'UZS' => 'лв',
|
291 |
+
'VEF' => 'Bs',
|
292 |
+
'VND' => '₫',
|
293 |
+
'VUV' => 'VT',
|
294 |
+
'WST' => 'WS$',
|
295 |
+
'XAF' => 'FCFA',
|
296 |
+
'XCD' => '$',
|
297 |
+
'XDR' => '',
|
298 |
+
'XOF' => '',
|
299 |
+
'XPF' => 'F',
|
300 |
+
'YER' => '﷼',
|
301 |
+
'ZAR' => 'R',
|
302 |
+
'ZMK' => 'ZK', // ?
|
303 |
+
'ZWL' => 'Z$',
|
304 |
+
);
|
305 |
+
|
306 |
+
if( !empty( $currency_symbols[$currency_code] ) )
|
307 |
+
return $currency_symbols[$currency_code];
|
308 |
+
else
|
309 |
+
return '';
|
310 |
+
|
311 |
+
}
|
wordpress-creation-kit-api/fields/colorpicker.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @param string $meta Meta name.
|
3 |
+
* @param array $details Contains the details for the field.
|
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 .= '<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( {} );
|
15 |
+
|
16 |
+
$( document ).click( function( e ) {
|
17 |
+
if( ! $( e.target ).is( ".mb-colorpicker, .iris-picker, .iris-picker-inner, .iris-slider, .iris-slider-offset, .iris-square-handle, .iris-square-value" ) ) {
|
18 |
+
$( ".mb-colorpicker" ).iris( "hide" );
|
19 |
+
}
|
20 |
+
} );
|
21 |
+
|
22 |
+
$( ".mb-colorpicker" ).click( function( event ) {
|
23 |
+
$( ".mb-colorpicker" ).iris( "hide" );
|
24 |
+
$( this ).iris( "show" );
|
25 |
+
} );
|
26 |
+
} );
|
27 |
+
</script>';
|
28 |
+
?>
|
wordpress-creation-kit-api/fields/currency select.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @param string $meta Meta name.
|
3 |
+
* @param array $details Contains the details for the field.
|
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 |
+
require_once( plugin_dir_path(__FILE__) . '../assets/currency/currency-select.php' );
|
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 ){
|
19 |
+
$currency_symbol = wck_get_currency_symbol( $currency_code );
|
20 |
+
|
21 |
+
$currency_name = ( empty( $currency_symbol ) ? $currency_name : $currency_name . ' (' . $currency_symbol . ')' );
|
22 |
+
|
23 |
+
$element .= '<option value="'. esc_attr( $currency_code ) .'" '. selected( $currency_code, $value, false ) .' >'. esc_html( $currency_name ) .'</option>';
|
24 |
+
}
|
25 |
+
}
|
26 |
+
$element .= '</select>';
|
27 |
+
?>
|
wordpress-creation-kit-api/fields/heading.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @param string $meta Meta name.
|
3 |
+
* @param array $details Contains the details for the field.
|
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 |
+
$item_title = esc_attr( $details['title'] );
|
9 |
+
$element .= '<h3>' . $item_title . '</h3>';
|
10 |
+
?>
|
wordpress-creation-kit-api/fields/textarea.php
CHANGED
@@ -4,9 +4,16 @@
|
|
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 |
-
$
|
|
|
|
|
|
|
|
|
9 |
if( !empty( $frontend_prefix ) )
|
10 |
$element .= $frontend_prefix;
|
11 |
-
$element .= esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" style="vertical-align:top;" class="mb-textarea mb-field"
|
|
|
|
|
|
|
12 |
?>
|
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 |
+
$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'] );
|
11 |
+
|
12 |
+
$element .= '<textarea name="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" rows="'. esc_attr( $number_of_rows ) .'" id="';
|
13 |
if( !empty( $frontend_prefix ) )
|
14 |
$element .= $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 |
?>
|
wordpress-creation-kit-api/wck-fep/wck-fep.css
CHANGED
@@ -373,11 +373,19 @@
|
|
373 |
}
|
374 |
|
375 |
.fep-container .fep-element-wrap, .fep-container .fep-single-element-wrap{
|
376 |
-
overflow:hidden;
|
377 |
clear:both;
|
378 |
margin-bottom:13px;
|
379 |
}
|
380 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
.fep-container .description{
|
382 |
font-size:90%;
|
383 |
font-style:italic;
|
373 |
}
|
374 |
|
375 |
.fep-container .fep-element-wrap, .fep-container .fep-single-element-wrap{
|
|
|
376 |
clear:both;
|
377 |
margin-bottom:13px;
|
378 |
}
|
379 |
|
380 |
+
.fep-container .fep-element-wrap:after,
|
381 |
+
.fep-container .fep-single-element-wrap:after {
|
382 |
+
content: ".";
|
383 |
+
visibility: hidden;
|
384 |
+
display: block;
|
385 |
+
height: 0;
|
386 |
+
clear: both;
|
387 |
+
}
|
388 |
+
|
389 |
.fep-container .description{
|
390 |
font-size:90%;
|
391 |
font-style:italic;
|
wordpress-creation-kit-api/wck-fep/wck-fep.php
CHANGED
@@ -78,7 +78,13 @@ class WCK_FrontEnd_Posting extends Wordpress_Creation_Kit{
|
|
78 |
//datepicker
|
79 |
wp_enqueue_script('jquery-ui-datepicker');
|
80 |
wp_enqueue_style('jquery-style', plugins_url( '', dirname(__FILE__) ).'/assets/datepicker/datepicker.css');
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
/* FEP script */
|
83 |
wp_register_script( 'wck-fep', plugins_url('wck-fep.js', __FILE__ ), array('jquery'), '1.0', true );
|
84 |
wp_register_style( 'wck-fep-css', plugins_url('wck-fep.css', __FILE__ ) );
|
78 |
//datepicker
|
79 |
wp_enqueue_script('jquery-ui-datepicker');
|
80 |
wp_enqueue_style('jquery-style', plugins_url( '', dirname(__FILE__) ).'/assets/datepicker/datepicker.css');
|
81 |
+
|
82 |
+
//colorpicker
|
83 |
+
wp_enqueue_style( 'wp-color-picker' );
|
84 |
+
wp_enqueue_style( 'wck-colorpicker-style', plugins_url( '', dirname(__FILE__) ).'/assets/colorpicker/colorpicker.css', false, '1.0' );
|
85 |
+
wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
|
86 |
+
wp_enqueue_script( 'wp-color-picker', admin_url( 'js/color-picker.min.js' ), array( 'iris' ), false, 1 );
|
87 |
+
|
88 |
/* FEP script */
|
89 |
wp_register_script( 'wck-fep', plugins_url('wck-fep.js', __FILE__ ), array('jquery'), '1.0', true );
|
90 |
wp_register_style( 'wck-fep-css', plugins_url('wck-fep.css', __FILE__ ) );
|
wordpress-creation-kit-api/wordpress-creation-kit.css
CHANGED
@@ -124,7 +124,6 @@ td.wck-number{
|
|
124 |
.mb-textarea{
|
125 |
width:60%;
|
126 |
max-width:600px;
|
127 |
-
height:130px;
|
128 |
}
|
129 |
.mb-text-input{
|
130 |
width:40%;
|
124 |
.mb-textarea{
|
125 |
width:60%;
|
126 |
max-width:600px;
|
|
|
127 |
}
|
128 |
.mb-text-input{
|
129 |
width:40%;
|
wordpress-creation-kit-api/wordpress-creation-kit.php
CHANGED
@@ -280,41 +280,52 @@ class Wordpress_Creation_Kit{
|
|
280 |
else
|
281 |
$single_prefix = '';
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
$
|
286 |
-
|
287 |
-
|
288 |
-
$
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
if( function_exists( 'wck_nr_get_repeater_boxes' ) ){
|
296 |
-
$cfc_titles = wck_nr_get_repeater_boxes();
|
297 |
-
if( in_array( $details['type'], $cfc_titles ) ){
|
298 |
-
$details['type'] = 'nested repeater';
|
299 |
}
|
300 |
}
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
}
|
310 |
-
|
311 |
-
$element .= '</div><!-- .mb-right-column -->';
|
312 |
|
313 |
$element = apply_filters( "wck_output_form_field", $element, $meta, $details);
|
314 |
$element = apply_filters( "wck_output_form_field_{$meta}_" . Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ), $element );
|
315 |
|
316 |
return $element;
|
317 |
-
|
318 |
}
|
319 |
|
320 |
|
@@ -552,9 +563,9 @@ class Wordpress_Creation_Kit{
|
|
552 |
/*check for nested repeater type and set it acordingly */
|
553 |
if( strpos( $details['type'], 'CFC-') === 0 )
|
554 |
$details['type'] = 'nested-repeater';
|
555 |
-
|
556 |
-
$list .= '<li class="row-'. esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" data-type="'
|
557 |
-
|
558 |
$list = apply_filters( "wck_after_listed_{$meta}_element_{$j}", $list, $element_id, $value );
|
559 |
|
560 |
$j++;
|
@@ -714,6 +725,14 @@ class Wordpress_Creation_Kit{
|
|
714 |
wp_enqueue_script('jquery-ui-datepicker');
|
715 |
wp_enqueue_style( 'jquery-style', plugins_url( '/assets/datepicker/datepicker.css', __FILE__ ) );
|
716 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
|
718 |
/* media upload */
|
719 |
wp_enqueue_media();
|
280 |
else
|
281 |
$single_prefix = '';
|
282 |
|
283 |
+
if( $details['type'] !== 'heading' ) {
|
284 |
+
$element .= '<label for="'. $single_prefix . esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" class="field-label">'. apply_filters( "wck_label_{$meta}_". Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ), ucfirst($details['title']) ) .':';
|
285 |
+
if( !empty( $details['required'] ) && $details['required'] )
|
286 |
+
$element .= '<span class="required">*</span>';
|
287 |
+
$element .= '</label>';
|
288 |
+
} elseif( $details['type'] === 'heading' ) {
|
289 |
+
if( file_exists( dirname( __FILE__ ) . '/fields/heading.php' ) ) {
|
290 |
+
require( dirname( __FILE__ ) . '/fields/heading.php' );
|
291 |
+
}
|
292 |
+
|
293 |
+
if( !empty( $details['description'] ) ){
|
294 |
+
$element .= '<p class="description">'. $details['description'].'</p>';
|
|
|
|
|
|
|
|
|
295 |
}
|
296 |
}
|
297 |
+
|
298 |
+
if( $details['type'] !== 'heading' ) {
|
299 |
+
$element .= '<div class="mb-right-column">';
|
300 |
+
|
301 |
+
/*
|
302 |
+
include actual field type
|
303 |
+
possible field types: heading, text, textarea, select, checkbox, radio, upload, wysiwyg editor, datepicker, colorpicker, country select, user select, cpt select
|
304 |
+
*/
|
305 |
+
|
306 |
+
if( function_exists( 'wck_nr_get_repeater_boxes' ) ) {
|
307 |
+
$cfc_titles = wck_nr_get_repeater_boxes();
|
308 |
+
if( in_array( $details['type'], $cfc_titles ) ) {
|
309 |
+
$details['type'] = 'nested repeater';
|
310 |
+
}
|
311 |
+
}
|
312 |
+
|
313 |
+
if( file_exists( dirname( __FILE__ ) . '/fields/' . $details['type'] . '.php' ) ) {
|
314 |
+
require( dirname( __FILE__ ) . '/fields/' . $details['type'] . '.php' );
|
315 |
+
}
|
316 |
+
|
317 |
+
if( ! empty( $details['description'] ) ) {
|
318 |
+
$element .= '<p class="description">' . $details['description'] . '</p>';
|
319 |
+
}
|
320 |
+
|
321 |
+
$element .= '</div><!-- .mb-right-column -->';
|
322 |
}
|
|
|
|
|
323 |
|
324 |
$element = apply_filters( "wck_output_form_field", $element, $meta, $details);
|
325 |
$element = apply_filters( "wck_output_form_field_{$meta}_" . Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ), $element );
|
326 |
|
327 |
return $element;
|
328 |
+
|
329 |
}
|
330 |
|
331 |
|
563 |
/*check for nested repeater type and set it acordingly */
|
564 |
if( strpos( $details['type'], 'CFC-') === 0 )
|
565 |
$details['type'] = 'nested-repeater';
|
566 |
+
|
567 |
+
$list .= '<li class="row-'. esc_attr( Wordpress_Creation_Kit::wck_generate_slug( $details['title'], $details ) ) .'" data-type="'. $details['type'] .'"><strong>'. $details['title'] . ( $details['type'] != 'heading' ? ':' : '' ) .' </strong>'. $display_value .' </li>';
|
568 |
+
|
569 |
$list = apply_filters( "wck_after_listed_{$meta}_element_{$j}", $list, $element_id, $value );
|
570 |
|
571 |
$j++;
|
725 |
wp_enqueue_script('jquery-ui-datepicker');
|
726 |
wp_enqueue_style( 'jquery-style', plugins_url( '/assets/datepicker/datepicker.css', __FILE__ ) );
|
727 |
}
|
728 |
+
|
729 |
+
//colorpicker
|
730 |
+
if ( file_exists( WCK_PLUGIN_DIR. '/wordpress-creation-kit-api/fields/colorpicker.php' ) ){
|
731 |
+
wp_enqueue_style( 'wp-color-picker' );
|
732 |
+
wp_enqueue_style( 'wck-colorpicker-style', plugins_url( '/assets/colorpicker/colorpicker.css', __FILE__ ), false, '1.0' );
|
733 |
+
wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
|
734 |
+
wp_enqueue_script( 'wp-color-picker', admin_url( 'js/color-picker.min.js' ), array( 'iris' ), false, 1 );
|
735 |
+
}
|
736 |
|
737 |
/* media upload */
|
738 |
wp_enqueue_media();
|