Version Description
- Support separated key and value in select, checkbox, radio.
- Added switching editor mode tab in wysiwyg field.
- Added instruction of field option.
Download this release
Release Info
Developer | inc2734 |
Plugin | Smart Custom Fields |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.1 to 2.1.0
- classes/class.scf.php +48 -5
- classes/controller/class.controller-base.php +24 -3
- classes/fields/class.field-boolean.php +10 -2
- classes/fields/class.field-check.php +18 -6
- classes/fields/class.field-colorpicker.php +12 -4
- classes/fields/class.field-datepicker.php +15 -7
- classes/fields/class.field-file.php +11 -3
- classes/fields/class.field-image.php +12 -4
- classes/fields/class.field-radio.php +18 -6
- classes/fields/class.field-relation.php +10 -2
- classes/fields/class.field-select.php +22 -9
- classes/fields/class.field-taxonomy.php +12 -4
- classes/fields/class.field-text.php +12 -4
- classes/fields/class.field-textarea.php +13 -5
- classes/fields/class.field-wysiwyg.php +25 -10
- css/editor.css +10 -2
- js/editor-wysiwyg.js +125 -16
- js/editor.js +3 -44
- languages/smart-custom-fields-ja.mo +0 -0
- languages/smart-custom-fields-ja.po +67 -48
- languages/smart-custom-fields.pot +79 -57
- readme.txt +6 -1
- smart-custom-fields.php +2 -2
classes/class.scf.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* SCF
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : September 23, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -336,8 +336,17 @@ class SCF {
|
|
336 |
$choices = SCF::choices_eol_to_array( $choices );
|
337 |
$default = SCF::choices_eol_to_array( $default );
|
338 |
$default_sanitized = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
foreach ( $default as $key => $value ) {
|
340 |
-
if ( in_array( $value, $
|
|
|
|
|
|
|
341 |
$default_sanitized[$key] = $value;
|
342 |
}
|
343 |
}
|
@@ -598,6 +607,31 @@ class SCF {
|
|
598 |
return true;
|
599 |
}
|
600 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
601 |
/**
|
602 |
* Adding the available form field object
|
603 |
*
|
@@ -664,8 +698,17 @@ class SCF {
|
|
664 |
if ( $choices === '' || $choices === false || $choices === null ) {
|
665 |
return array();
|
666 |
}
|
667 |
-
$
|
668 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
669 |
}
|
670 |
return $choices;
|
671 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
* SCF
|
4 |
+
* Version : 1.5.0
|
5 |
* Author : inc2734
|
6 |
* Created : September 23, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
336 |
$choices = SCF::choices_eol_to_array( $choices );
|
337 |
$default = SCF::choices_eol_to_array( $default );
|
338 |
$default_sanitized = array();
|
339 |
+
|
340 |
+
if ( SCF::is_assoc( $choices ) ) {
|
341 |
+
$_choices = array_flip( $choices );
|
342 |
+
} else {
|
343 |
+
$_choices = $choices;
|
344 |
+
}
|
345 |
foreach ( $default as $key => $value ) {
|
346 |
+
if ( in_array( $value, $_choices ) ) {
|
347 |
+
if ( preg_match( '/^\d+$/', $value ) ) {
|
348 |
+
$value = (int)$value;
|
349 |
+
}
|
350 |
$default_sanitized[$key] = $value;
|
351 |
}
|
352 |
}
|
607 |
return true;
|
608 |
}
|
609 |
|
610 |
+
/**
|
611 |
+
* Whether the associative array or not
|
612 |
+
*
|
613 |
+
* @see http://qiita.com/ka215/items/a14e53547e717d2a564f
|
614 |
+
* @param array $data This argument should be expected an array
|
615 |
+
* @param boolean $multidimensional True if a multidimensional array is inclusion into associative array, the default value is false
|
616 |
+
* @return boolean
|
617 |
+
*/
|
618 |
+
public static function is_assoc( $data, $multidimensional=false ) {
|
619 |
+
if ( !is_array( $data ) || empty( $data ) ) {
|
620 |
+
return false;
|
621 |
+
}
|
622 |
+
$has_array = false;
|
623 |
+
foreach ( $data as $key => $value ) {
|
624 |
+
if ( is_array( $value ) ) {
|
625 |
+
$has_array = true;
|
626 |
+
}
|
627 |
+
|
628 |
+
if ( !is_int( $key ) ) {
|
629 |
+
return true;
|
630 |
+
}
|
631 |
+
}
|
632 |
+
return $multidimensional && $has_array ? true : false;
|
633 |
+
}
|
634 |
+
|
635 |
/**
|
636 |
* Adding the available form field object
|
637 |
*
|
698 |
if ( $choices === '' || $choices === false || $choices === null ) {
|
699 |
return array();
|
700 |
}
|
701 |
+
$_choices = str_replace( array( "\r\n", "\r", "\n" ), "\n", $choices );
|
702 |
+
$_choices = explode( "\n", $_choices );
|
703 |
+
$choices = array();
|
704 |
+
foreach ( $_choices as $_choice ) {
|
705 |
+
$_choice = array_map( 'trim', explode( '=>', $_choice ) );
|
706 |
+
if ( count( $_choice ) === 2 ) {
|
707 |
+
$choices[$_choice[0]] = $_choice[1];
|
708 |
+
} else {
|
709 |
+
$choices = array_merge( $choices, $_choice );
|
710 |
+
}
|
711 |
+
}
|
712 |
}
|
713 |
return $choices;
|
714 |
}
|
classes/controller/class.controller-base.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Controller_Base
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : April 27, 2015
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -290,6 +290,19 @@ class Smart_Custom_Fields_Controller_Base {
|
|
290 |
$value = $this->get_single_data_field_value( $object, $Field, $index );
|
291 |
}
|
292 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
$notes = $Field->get( 'notes' );
|
294 |
if ( !empty( $notes ) ) {
|
295 |
$notes = sprintf(
|
@@ -300,8 +313,16 @@ class Smart_Custom_Fields_Controller_Base {
|
|
300 |
|
301 |
$form_field = $Field->get_field( $index, $value );
|
302 |
printf(
|
303 |
-
'<tr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
esc_html( $field_label ),
|
|
|
305 |
$form_field,
|
306 |
$notes
|
307 |
);
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Controller_Base
|
4 |
+
* Version : 1.4.0
|
5 |
* Author : inc2734
|
6 |
* Created : April 27, 2015
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
290 |
$value = $this->get_single_data_field_value( $object, $Field, $index );
|
291 |
}
|
292 |
|
293 |
+
$instruction = $Field->get( 'instruction' );
|
294 |
+
if ( !empty( $instruction ) ) {
|
295 |
+
if ( apply_filters( SCF_Config::PREFIX . 'instruction-apply-html', false ) === true ) {
|
296 |
+
$instruction_html = $instruction;
|
297 |
+
} else {
|
298 |
+
$instruction_html = esc_html( $instruction );
|
299 |
+
}
|
300 |
+
$instruction = sprintf(
|
301 |
+
'<div class="instruction">%s</div>',
|
302 |
+
$instruction_html
|
303 |
+
);
|
304 |
+
}
|
305 |
+
|
306 |
$notes = $Field->get( 'notes' );
|
307 |
if ( !empty( $notes ) ) {
|
308 |
$notes = sprintf(
|
313 |
|
314 |
$form_field = $Field->get_field( $index, $value );
|
315 |
printf(
|
316 |
+
'<tr>
|
317 |
+
<th>%1$s</th>
|
318 |
+
<td>
|
319 |
+
%2$s
|
320 |
+
%3$s
|
321 |
+
%4$s
|
322 |
+
</td>
|
323 |
+
</tr>',
|
324 |
esc_html( $field_label ),
|
325 |
+
$instruction,
|
326 |
$form_field,
|
327 |
$notes
|
328 |
);
|
classes/fields/class.field-boolean.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
|
3 |
/**
|
4 |
* Smart_Custom_Fields_Field_Boolean
|
5 |
-
* Version : 1.0
|
6 |
* Author : Toro_Unit, inc2734
|
7 |
* Created : April 6, 2015
|
8 |
-
* Modified :
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
@@ -34,6 +34,7 @@ class Smart_Custom_Fields_Field_Boolean extends Smart_Custom_Fields_Field_Base {
|
|
34 |
protected function options() {
|
35 |
return array(
|
36 |
'default' => 0,
|
|
|
37 |
'notes' => '',
|
38 |
'true_label' => __( 'Yes', 'smart-custom-fields' ),
|
39 |
'false_label' => __( 'No', 'smart-custom-fields' ),
|
@@ -123,6 +124,13 @@ class Smart_Custom_Fields_Field_Boolean extends Smart_Custom_Fields_Field_Base {
|
|
123 |
/>
|
124 |
</td>
|
125 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
<tr>
|
127 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
128 |
<td>
|
2 |
|
3 |
/**
|
4 |
* Smart_Custom_Fields_Field_Boolean
|
5 |
+
* Version : 1.1.0
|
6 |
* Author : Toro_Unit, inc2734
|
7 |
* Created : April 6, 2015
|
8 |
+
* Modified : June 4, 2016
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
34 |
protected function options() {
|
35 |
return array(
|
36 |
'default' => 0,
|
37 |
+
'instruction' => '',
|
38 |
'notes' => '',
|
39 |
'true_label' => __( 'Yes', 'smart-custom-fields' ),
|
40 |
'false_label' => __( 'No', 'smart-custom-fields' ),
|
124 |
/>
|
125 |
</td>
|
126 |
</tr>
|
127 |
+
<tr>
|
128 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
129 |
+
<td>
|
130 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
131 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
132 |
+
</td>
|
133 |
+
</tr>
|
134 |
<tr>
|
135 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
136 |
<td>
|
classes/fields/class.field-check.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Check
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -34,6 +34,7 @@ class Smart_Custom_Fields_Field_Check extends Smart_Custom_Fields_Field_Base {
|
|
34 |
'choices' => '',
|
35 |
'check_direction' => 'horizontal', // or vertical
|
36 |
'default' => '',
|
|
|
37 |
'notes' => '',
|
38 |
);
|
39 |
}
|
@@ -56,14 +57,17 @@ class Smart_Custom_Fields_Field_Check extends Smart_Custom_Fields_Field_Base {
|
|
56 |
esc_attr( $name ),
|
57 |
disabled( true, $disabled, false )
|
58 |
);
|
59 |
-
foreach ( $choices as $choice ) {
|
60 |
$choice = trim( $choice );
|
|
|
|
|
|
|
61 |
$form_field .= sprintf(
|
62 |
-
'<span class="%s"><label><input type="checkbox" name="%s" value="%s" %s %s /> %s</label></span>',
|
63 |
esc_attr( SCF_Config::PREFIX . 'item-' . $direction ),
|
64 |
esc_attr( $name . '[]' ),
|
65 |
-
esc_attr( $
|
66 |
-
checked( true, ( is_array( $value ) && in_array( $
|
67 |
disabled( true, $disabled, false ),
|
68 |
esc_html( $choice )
|
69 |
);
|
@@ -86,6 +90,7 @@ class Smart_Custom_Fields_Field_Check extends Smart_Custom_Fields_Field_Base {
|
|
86 |
name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'choices' ) ); ?>"
|
87 |
class="widefat"
|
88 |
rows="5" /><?php echo esc_textarea( "\n" . $this->get( 'choices' ) ); ?></textarea>
|
|
|
89 |
</td>
|
90 |
</tr>
|
91 |
<tr>
|
@@ -117,6 +122,13 @@ class Smart_Custom_Fields_Field_Check extends Smart_Custom_Fields_Field_Base {
|
|
117 |
rows="5" /><?php echo esc_textarea( "\n" . $this->get( 'default' ) ); ?></textarea>
|
118 |
</td>
|
119 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
<tr>
|
121 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
122 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Check
|
4 |
+
* Version : 1.3.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
34 |
'choices' => '',
|
35 |
'check_direction' => 'horizontal', // or vertical
|
36 |
'default' => '',
|
37 |
+
'instruction' => '',
|
38 |
'notes' => '',
|
39 |
);
|
40 |
}
|
57 |
esc_attr( $name ),
|
58 |
disabled( true, $disabled, false )
|
59 |
);
|
60 |
+
foreach ( $choices as $key => $choice ) {
|
61 |
$choice = trim( $choice );
|
62 |
+
if ( !SCF::is_assoc( $choices ) ) {
|
63 |
+
$key = $choice;
|
64 |
+
}
|
65 |
$form_field .= sprintf(
|
66 |
+
'<span class="%1$s"><label><input type="checkbox" name="%2$s" value="%3$s" %4$s %5$s /> %6$s</label></span>',
|
67 |
esc_attr( SCF_Config::PREFIX . 'item-' . $direction ),
|
68 |
esc_attr( $name . '[]' ),
|
69 |
+
esc_attr( $key ),
|
70 |
+
checked( true, ( is_array( $value ) && in_array( $key, $value ) ), false ),
|
71 |
disabled( true, $disabled, false ),
|
72 |
esc_html( $choice )
|
73 |
);
|
90 |
name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'choices' ) ); ?>"
|
91 |
class="widefat"
|
92 |
rows="5" /><?php echo esc_textarea( "\n" . $this->get( 'choices' ) ); ?></textarea>
|
93 |
+
<?php esc_html_e( 'If you want to separate the key and the value, enter as follows: key => value', 'smart-custom-fields' ); ?>
|
94 |
</td>
|
95 |
</tr>
|
96 |
<tr>
|
122 |
rows="5" /><?php echo esc_textarea( "\n" . $this->get( 'default' ) ); ?></textarea>
|
123 |
</td>
|
124 |
</tr>
|
125 |
+
<tr>
|
126 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
127 |
+
<td>
|
128 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
129 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
130 |
+
</td>
|
131 |
+
</tr>
|
132 |
<tr>
|
133 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
134 |
<td>
|
classes/fields/class.field-colorpicker.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Colorpicker
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 21, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -38,8 +38,9 @@ class Smart_Custom_Fields_Field_Colorpicker extends Smart_Custom_Fields_Field_Ba
|
|
38 |
*/
|
39 |
protected function options() {
|
40 |
return array(
|
41 |
-
'default'
|
42 |
-
'
|
|
|
43 |
);
|
44 |
}
|
45 |
|
@@ -107,6 +108,13 @@ class Smart_Custom_Fields_Field_Colorpicker extends Smart_Custom_Fields_Field_Ba
|
|
107 |
value="<?php echo esc_attr( $this->get( 'default' ) ); ?>" />
|
108 |
</td>
|
109 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
<tr>
|
111 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
112 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Colorpicker
|
4 |
+
* Version : 1.2.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 21, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
38 |
*/
|
39 |
protected function options() {
|
40 |
return array(
|
41 |
+
'default' => '',
|
42 |
+
'instruction' => '',
|
43 |
+
'notes' => '',
|
44 |
);
|
45 |
}
|
46 |
|
108 |
value="<?php echo esc_attr( $this->get( 'default' ) ); ?>" />
|
109 |
</td>
|
110 |
</tr>
|
111 |
+
<tr>
|
112 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
113 |
+
<td>
|
114 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
115 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
116 |
+
</td>
|
117 |
+
</tr>
|
118 |
<tr>
|
119 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
120 |
<td>
|
classes/fields/class.field-datepicker.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Datepicker
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : January 17, 2015
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -42,6 +42,7 @@ class Smart_Custom_Fields_Field_Datepicker extends Smart_Custom_Fields_Field_Bas
|
|
42 |
'max_date' => '',
|
43 |
'min_date' => '',
|
44 |
'default' => '',
|
|
|
45 |
'notes' => '',
|
46 |
);
|
47 |
}
|
@@ -184,6 +185,13 @@ class Smart_Custom_Fields_Field_Datepicker extends Smart_Custom_Fields_Field_Bas
|
|
184 |
</span>
|
185 |
</td>
|
186 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
<tr>
|
188 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
189 |
<td>
|
@@ -208,7 +216,7 @@ class Smart_Custom_Fields_Field_Datepicker extends Smart_Custom_Fields_Field_Bas
|
|
208 |
'changeYear' => true,
|
209 |
'changeMonth' => true,
|
210 |
);
|
211 |
-
|
212 |
// If locale is Japanese, change in Japanese notation
|
213 |
if ( get_locale() === 'ja' ) {
|
214 |
$js = array_merge( $js, array(
|
@@ -231,19 +239,19 @@ class Smart_Custom_Fields_Field_Datepicker extends Smart_Custom_Fields_Field_Bas
|
|
231 |
)
|
232 |
) );
|
233 |
}
|
234 |
-
|
235 |
if ( $this->get( 'date_format' ) ) {
|
236 |
$js['dateFormat'] = $this->get( 'date_format' );
|
237 |
}
|
238 |
-
|
239 |
if ( $this->get( 'max_date' ) ) {
|
240 |
$js['maxDate'] = $this->get( 'max_date' );
|
241 |
}
|
242 |
-
|
243 |
if ( $this->get( 'min_date' ) ) {
|
244 |
$js['minDate'] = $this->get( 'min_date' );
|
245 |
}
|
246 |
-
|
247 |
return json_encode( $js );
|
248 |
}
|
249 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Datepicker
|
4 |
+
* Version : 1.2.0
|
5 |
* Author : inc2734
|
6 |
* Created : January 17, 2015
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
42 |
'max_date' => '',
|
43 |
'min_date' => '',
|
44 |
'default' => '',
|
45 |
+
'instruction' => '',
|
46 |
'notes' => '',
|
47 |
);
|
48 |
}
|
185 |
</span>
|
186 |
</td>
|
187 |
</tr>
|
188 |
+
<tr>
|
189 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
190 |
+
<td>
|
191 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
192 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
193 |
+
</td>
|
194 |
+
</tr>
|
195 |
<tr>
|
196 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
197 |
<td>
|
216 |
'changeYear' => true,
|
217 |
'changeMonth' => true,
|
218 |
);
|
219 |
+
|
220 |
// If locale is Japanese, change in Japanese notation
|
221 |
if ( get_locale() === 'ja' ) {
|
222 |
$js = array_merge( $js, array(
|
239 |
)
|
240 |
) );
|
241 |
}
|
242 |
+
|
243 |
if ( $this->get( 'date_format' ) ) {
|
244 |
$js['dateFormat'] = $this->get( 'date_format' );
|
245 |
}
|
246 |
+
|
247 |
if ( $this->get( 'max_date' ) ) {
|
248 |
$js['maxDate'] = $this->get( 'max_date' );
|
249 |
}
|
250 |
+
|
251 |
if ( $this->get( 'min_date' ) ) {
|
252 |
$js['minDate'] = $this->get( 'min_date' );
|
253 |
}
|
254 |
+
|
255 |
return json_encode( $js );
|
256 |
}
|
257 |
}
|
classes/fields/class.field-file.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_File
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -30,7 +30,8 @@ class Smart_Custom_Fields_Field_File extends Smart_Custom_Fields_Field_Base {
|
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
-
'
|
|
|
34 |
);
|
35 |
}
|
36 |
|
@@ -88,6 +89,13 @@ class Smart_Custom_Fields_Field_File extends Smart_Custom_Fields_Field_Base {
|
|
88 |
*/
|
89 |
public function display_field_options( $group_key, $field_key ) {
|
90 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
<tr>
|
92 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
93 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_File
|
4 |
+
* Version : 1.2.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
+
'instruction' => '',
|
34 |
+
'notes' => '',
|
35 |
);
|
36 |
}
|
37 |
|
89 |
*/
|
90 |
public function display_field_options( $group_key, $field_key ) {
|
91 |
?>
|
92 |
+
<tr>
|
93 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
94 |
+
<td>
|
95 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
96 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
<tr>
|
100 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
101 |
<td>
|
classes/fields/class.field-image.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Image
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -30,8 +30,9 @@ class Smart_Custom_Fields_Field_Image extends Smart_Custom_Fields_Field_Base {
|
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
-
'
|
34 |
-
'
|
|
|
35 |
);
|
36 |
}
|
37 |
|
@@ -89,6 +90,13 @@ class Smart_Custom_Fields_Field_Image extends Smart_Custom_Fields_Field_Base {
|
|
89 |
*/
|
90 |
public function display_field_options( $group_key, $field_key ) {
|
91 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
<tr>
|
93 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
94 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Image
|
4 |
+
* Version : 1.2.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
+
'instruction' => '',
|
34 |
+
'notes' => '',
|
35 |
+
'size' => 'full',
|
36 |
);
|
37 |
}
|
38 |
|
90 |
*/
|
91 |
public function display_field_options( $group_key, $field_key ) {
|
92 |
?>
|
93 |
+
<tr>
|
94 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
95 |
+
<td>
|
96 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
97 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
98 |
+
</td>
|
99 |
+
</tr>
|
100 |
<tr>
|
101 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
102 |
<td>
|
classes/fields/class.field-radio.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Radio
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -33,6 +33,7 @@ class Smart_Custom_Fields_Field_Radio extends Smart_Custom_Fields_Field_Base {
|
|
33 |
'choices' => '',
|
34 |
'radio_direction' => 'horizontal', // or vertical
|
35 |
'default' => '',
|
|
|
36 |
'notes' => '',
|
37 |
);
|
38 |
}
|
@@ -55,14 +56,17 @@ class Smart_Custom_Fields_Field_Radio extends Smart_Custom_Fields_Field_Base {
|
|
55 |
esc_attr( $name ),
|
56 |
disabled( true, $disabled, false )
|
57 |
);
|
58 |
-
foreach ( $choices as $choice ) {
|
59 |
$choice = trim( $choice );
|
|
|
|
|
|
|
60 |
$form_field .= sprintf(
|
61 |
-
'<span class="%s"><label><input type="radio" name="%s" value="%s" %s %s /> %s</label></span>',
|
62 |
esc_attr( SCF_Config::PREFIX . 'item-' . $direction ),
|
63 |
esc_attr( $name ),
|
64 |
-
esc_attr( $
|
65 |
-
checked( $value, $
|
66 |
disabled( true, $disabled, false ),
|
67 |
esc_html( $choice )
|
68 |
);
|
@@ -85,6 +89,7 @@ class Smart_Custom_Fields_Field_Radio extends Smart_Custom_Fields_Field_Base {
|
|
85 |
name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'choices' ) ); ?>"
|
86 |
class="widefat"
|
87 |
rows="5" /><?php echo esc_textarea( "\n" . $this->get( 'choices' ) ); ?></textarea>
|
|
|
88 |
</td>
|
89 |
</tr>
|
90 |
<tr>
|
@@ -116,6 +121,13 @@ class Smart_Custom_Fields_Field_Radio extends Smart_Custom_Fields_Field_Base {
|
|
116 |
value="<?php echo esc_attr( $this->get( 'default' ) ); ?>" />
|
117 |
</td>
|
118 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
<tr>
|
120 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
121 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Radio
|
4 |
+
* Version : 1.3.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
33 |
'choices' => '',
|
34 |
'radio_direction' => 'horizontal', // or vertical
|
35 |
'default' => '',
|
36 |
+
'instruction' => '',
|
37 |
'notes' => '',
|
38 |
);
|
39 |
}
|
56 |
esc_attr( $name ),
|
57 |
disabled( true, $disabled, false )
|
58 |
);
|
59 |
+
foreach ( $choices as $key => $choice ) {
|
60 |
$choice = trim( $choice );
|
61 |
+
if ( !SCF::is_assoc( $choices ) ) {
|
62 |
+
$key = $choice;
|
63 |
+
}
|
64 |
$form_field .= sprintf(
|
65 |
+
'<span class="%1$s"><label><input type="radio" name="%2$s" value="%3$s" %4$s %5$s /> %6$s</label></span>',
|
66 |
esc_attr( SCF_Config::PREFIX . 'item-' . $direction ),
|
67 |
esc_attr( $name ),
|
68 |
+
esc_attr( $key ),
|
69 |
+
checked( $value, $key, false ),
|
70 |
disabled( true, $disabled, false ),
|
71 |
esc_html( $choice )
|
72 |
);
|
89 |
name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'choices' ) ); ?>"
|
90 |
class="widefat"
|
91 |
rows="5" /><?php echo esc_textarea( "\n" . $this->get( 'choices' ) ); ?></textarea>
|
92 |
+
<?php esc_html_e( 'If you want to separate the key and the value, enter as follows: key => value', 'smart-custom-fields' ); ?>
|
93 |
</td>
|
94 |
</tr>
|
95 |
<tr>
|
121 |
value="<?php echo esc_attr( $this->get( 'default' ) ); ?>" />
|
122 |
</td>
|
123 |
</tr>
|
124 |
+
<tr>
|
125 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
126 |
+
<td>
|
127 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
128 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
129 |
+
</td>
|
130 |
+
</tr>
|
131 |
<tr>
|
132 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
133 |
<td>
|
classes/fields/class.field-relation.php
CHANGED
@@ -34,8 +34,9 @@ class Smart_Custom_Fields_Field_Relation extends Smart_Custom_Fields_Field_Base
|
|
34 |
*/
|
35 |
protected function options() {
|
36 |
return array(
|
37 |
-
'post-type'
|
38 |
-
'
|
|
|
39 |
);
|
40 |
}
|
41 |
|
@@ -230,6 +231,13 @@ class Smart_Custom_Fields_Field_Relation extends Smart_Custom_Fields_Field_Base
|
|
230 |
<?php endforeach; ?>
|
231 |
</td>
|
232 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
<tr>
|
234 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
235 |
<td>
|
34 |
*/
|
35 |
protected function options() {
|
36 |
return array(
|
37 |
+
'post-type' => '',
|
38 |
+
'instruction' => '',
|
39 |
+
'notes' => '',
|
40 |
);
|
41 |
}
|
42 |
|
231 |
<?php endforeach; ?>
|
232 |
</td>
|
233 |
</tr>
|
234 |
+
<tr>
|
235 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
236 |
+
<td>
|
237 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
238 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
239 |
+
</td>
|
240 |
+
</tr>
|
241 |
<tr>
|
242 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
243 |
<td>
|
classes/fields/class.field-select.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Select
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -30,9 +30,10 @@ class Smart_Custom_Fields_Field_Select extends Smart_Custom_Fields_Field_Base {
|
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
-
'choices'
|
34 |
-
'default'
|
35 |
-
'
|
|
|
36 |
);
|
37 |
}
|
38 |
|
@@ -49,11 +50,15 @@ class Smart_Custom_Fields_Field_Select extends Smart_Custom_Fields_Field_Base {
|
|
49 |
$choices = SCF::choices_eol_to_array( $this->get( 'choices' ) );
|
50 |
|
51 |
$form_field = '';
|
52 |
-
foreach ( $choices as $choice ) {
|
53 |
$choice = trim( $choice );
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
57 |
);
|
58 |
}
|
59 |
return sprintf(
|
@@ -79,6 +84,7 @@ class Smart_Custom_Fields_Field_Select extends Smart_Custom_Fields_Field_Base {
|
|
79 |
name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'choices' ) ); ?>"
|
80 |
class="widefat"
|
81 |
rows="5" /><?php echo esc_textarea( "\n" . $this->get( 'choices' ) ); ?></textarea>
|
|
|
82 |
</td>
|
83 |
</tr>
|
84 |
<tr>
|
@@ -90,6 +96,13 @@ class Smart_Custom_Fields_Field_Select extends Smart_Custom_Fields_Field_Base {
|
|
90 |
value="<?php echo esc_attr( $this->get( 'default' ) ); ?>" />
|
91 |
</td>
|
92 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
<tr>
|
94 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
95 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Select
|
4 |
+
* Version : 1.3.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
+
'choices' => '',
|
34 |
+
'default' => '',
|
35 |
+
'instruction' => '',
|
36 |
+
'notes' => '',
|
37 |
);
|
38 |
}
|
39 |
|
50 |
$choices = SCF::choices_eol_to_array( $this->get( 'choices' ) );
|
51 |
|
52 |
$form_field = '';
|
53 |
+
foreach ( $choices as $key => $choice ) {
|
54 |
$choice = trim( $choice );
|
55 |
+
if ( !SCF::is_assoc( $choices ) ) {
|
56 |
+
$key = $choice;
|
57 |
+
}
|
58 |
+
$form_field .= sprintf( '<option value="%1$s" %2$s>%3$s</option>',
|
59 |
+
esc_attr( $key ),
|
60 |
+
selected( $value, $key, false ),
|
61 |
+
esc_html( $choice )
|
62 |
);
|
63 |
}
|
64 |
return sprintf(
|
84 |
name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'choices' ) ); ?>"
|
85 |
class="widefat"
|
86 |
rows="5" /><?php echo esc_textarea( "\n" . $this->get( 'choices' ) ); ?></textarea>
|
87 |
+
<?php esc_html_e( 'If you want to separate the key and the value, enter as follows: key => value', 'smart-custom-fields' ); ?>
|
88 |
</td>
|
89 |
</tr>
|
90 |
<tr>
|
96 |
value="<?php echo esc_attr( $this->get( 'default' ) ); ?>" />
|
97 |
</td>
|
98 |
</tr>
|
99 |
+
<tr>
|
100 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
101 |
+
<td>
|
102 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
103 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
<tr>
|
107 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
108 |
<td>
|
classes/fields/class.field-taxonomy.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Taxonomy
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -34,8 +34,9 @@ class Smart_Custom_Fields_Field_Taxonomy extends Smart_Custom_Fields_Field_Base
|
|
34 |
*/
|
35 |
protected function options() {
|
36 |
return array(
|
37 |
-
'taxonomy'
|
38 |
-
'
|
|
|
39 |
);
|
40 |
}
|
41 |
|
@@ -231,6 +232,13 @@ class Smart_Custom_Fields_Field_Taxonomy extends Smart_Custom_Fields_Field_Base
|
|
231 |
<?php endforeach; ?>
|
232 |
</td>
|
233 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
<tr>
|
235 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
236 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Taxonomy
|
4 |
+
* Version : 1.4.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
34 |
*/
|
35 |
protected function options() {
|
36 |
return array(
|
37 |
+
'taxonomy' => '',
|
38 |
+
'instruction' => '',
|
39 |
+
'notes' => '',
|
40 |
);
|
41 |
}
|
42 |
|
232 |
<?php endforeach; ?>
|
233 |
</td>
|
234 |
</tr>
|
235 |
+
<tr>
|
236 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
237 |
+
<td>
|
238 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
239 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
240 |
+
</td>
|
241 |
+
</tr>
|
242 |
<tr>
|
243 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
244 |
<td>
|
classes/fields/class.field-text.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Text
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -30,8 +30,9 @@ class Smart_Custom_Fields_Field_Text extends Smart_Custom_Fields_Field_Base {
|
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
-
'default'
|
34 |
-
'
|
|
|
35 |
);
|
36 |
}
|
37 |
|
@@ -70,6 +71,13 @@ class Smart_Custom_Fields_Field_Text extends Smart_Custom_Fields_Field_Base {
|
|
70 |
value="<?php echo esc_attr( $this->get( 'default' ) ); ?>" />
|
71 |
</td>
|
72 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
<tr>
|
74 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
75 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Text
|
4 |
+
* Version : 1.2.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
+
'default' => '',
|
34 |
+
'instruction' => '',
|
35 |
+
'notes' => '',
|
36 |
);
|
37 |
}
|
38 |
|
71 |
value="<?php echo esc_attr( $this->get( 'default' ) ); ?>" />
|
72 |
</td>
|
73 |
</tr>
|
74 |
+
<tr>
|
75 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
76 |
+
<td>
|
77 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
78 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
<tr>
|
82 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
83 |
<td>
|
classes/fields/class.field-textarea.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Textarea
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -30,9 +30,10 @@ class Smart_Custom_Fields_Field_Textarea extends Smart_Custom_Fields_Field_Base
|
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
-
'rows'
|
34 |
-
'default'
|
35 |
-
'
|
|
|
36 |
);
|
37 |
}
|
38 |
|
@@ -83,6 +84,13 @@ class Smart_Custom_Fields_Field_Textarea extends Smart_Custom_Fields_Field_Base
|
|
83 |
rows="5"><?php echo esc_textarea( "\n" . $this->get( 'default' ) ); ?></textarea>
|
84 |
</td>
|
85 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
<tr>
|
87 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
88 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Textarea
|
4 |
+
* Version : 1.3.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
+
'rows' => 5,
|
34 |
+
'default' => '',
|
35 |
+
'instruction' => '',
|
36 |
+
'notes' => '',
|
37 |
);
|
38 |
}
|
39 |
|
84 |
rows="5"><?php echo esc_textarea( "\n" . $this->get( 'default' ) ); ?></textarea>
|
85 |
</td>
|
86 |
</tr>
|
87 |
+
<tr>
|
88 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
89 |
+
<td>
|
90 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
91 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
92 |
+
</td>
|
93 |
+
</tr>
|
94 |
<tr>
|
95 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
96 |
<td>
|
classes/fields/class.field-wysiwyg.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Wysiwyg
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -35,8 +35,9 @@ class Smart_Custom_Fields_Field_Wysiwyg extends Smart_Custom_Fields_Field_Base {
|
|
35 |
*/
|
36 |
protected function options() {
|
37 |
return array(
|
38 |
-
'default'
|
39 |
-
'
|
|
|
40 |
);
|
41 |
}
|
42 |
|
@@ -76,23 +77,30 @@ class Smart_Custom_Fields_Field_Wysiwyg extends Smart_Custom_Fields_Field_Base {
|
|
76 |
* @return string html
|
77 |
*/
|
78 |
public function get_field( $index, $value ) {
|
79 |
-
$name
|
80 |
-
$
|
|
|
81 |
if ( function_exists( 'format_for_editor' ) ) {
|
82 |
$value = format_for_editor( $value );
|
83 |
} else {
|
84 |
$value = wp_richedit_pre( $value );
|
85 |
}
|
86 |
return sprintf(
|
87 |
-
'<div class="wp-editor-wrap">
|
88 |
<div class="wp-editor-tools hide-if-no-js">
|
89 |
-
<div class="wp-media-buttons">%s</div>
|
|
|
|
|
|
|
|
|
90 |
</div>
|
91 |
<div class="wp-editor-container">
|
92 |
-
<
|
|
|
93 |
</div>
|
94 |
</div>',
|
95 |
-
$this->media_buttons(),
|
|
|
96 |
esc_attr( $name ),
|
97 |
disabled( true, $disabled, false ),
|
98 |
$value
|
@@ -116,6 +124,13 @@ class Smart_Custom_Fields_Field_Wysiwyg extends Smart_Custom_Fields_Field_Base {
|
|
116 |
rows="5"><?php echo esc_textarea( "\n" . $this->get( 'default' ) ); ?></textarea>
|
117 |
</td>
|
118 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
<tr>
|
120 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
121 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Wysiwyg
|
4 |
+
* Version : 1.2.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : June 4, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
35 |
*/
|
36 |
protected function options() {
|
37 |
return array(
|
38 |
+
'default' => '',
|
39 |
+
'instruction' => '',
|
40 |
+
'notes' => '',
|
41 |
);
|
42 |
}
|
43 |
|
77 |
* @return string html
|
78 |
*/
|
79 |
public function get_field( $index, $value ) {
|
80 |
+
$name = $this->get_field_name_in_editor( $index );
|
81 |
+
$wysiwyg_id = str_replace( array( '[', ']', '-' ), '_', $name );
|
82 |
+
$disabled = $this->get_disable_attribute( $index );
|
83 |
if ( function_exists( 'format_for_editor' ) ) {
|
84 |
$value = format_for_editor( $value );
|
85 |
} else {
|
86 |
$value = wp_richedit_pre( $value );
|
87 |
}
|
88 |
return sprintf(
|
89 |
+
'<div class="wp-core-ui wp-editor-wrap tmce-active">
|
90 |
<div class="wp-editor-tools hide-if-no-js">
|
91 |
+
<div class="wp-media-buttons">%1$s</div>
|
92 |
+
<div class="wp-editor-tabs">
|
93 |
+
<button type="button" id="%2$s-tmce" class="smart-cf-switch-editor wp-switch-editor switch-tmce" data-wp-editor-id="%2$s">ビジュアル</button>
|
94 |
+
<button type="button" id="%2$s-html" class="smart-cf-switch-editor wp-switch-editor switch-html" data-wp-editor-id="%2$s">テキスト</button>
|
95 |
+
</div>
|
96 |
</div>
|
97 |
<div class="wp-editor-container">
|
98 |
+
<div id="qt_%2$s_toolbar" class="quicktags-toolbar"></div>
|
99 |
+
<textarea name="%3$s" rows="8" class="widefat wp-editor-area smart-cf-wp-editor" %4$s>%5$s</textarea>
|
100 |
</div>
|
101 |
</div>',
|
102 |
+
$this->media_buttons( $wysiwyg_id ),
|
103 |
+
esc_attr( $wysiwyg_id ),
|
104 |
esc_attr( $name ),
|
105 |
disabled( true, $disabled, false ),
|
106 |
$value
|
124 |
rows="5"><?php echo esc_textarea( "\n" . $this->get( 'default' ) ); ?></textarea>
|
125 |
</td>
|
126 |
</tr>
|
127 |
+
<tr>
|
128 |
+
<th><?php esc_html_e( 'Instruction', 'smart-custom-fields' ); ?></th>
|
129 |
+
<td>
|
130 |
+
<textarea name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'instruction' ) ); ?>"
|
131 |
+
class="widefat" rows="5"><?php echo esc_attr( $this->get( 'instruction' ) ); ?></textarea>
|
132 |
+
</td>
|
133 |
+
</tr>
|
134 |
<tr>
|
135 |
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
136 |
<td>
|
css/editor.css
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
/**
|
2 |
* editor.css
|
3 |
-
* Version : 1.3.
|
4 |
* Author : inc2734
|
5 |
* Created : September 23, 2014
|
6 |
-
* Modified :
|
7 |
* License : GPLv2 or later
|
8 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
*/
|
@@ -39,12 +39,20 @@
|
|
39 |
.smart-cf-meta-box-table td label {
|
40 |
margin-right: 10px;
|
41 |
}
|
|
|
|
|
|
|
42 |
.smart-cf-meta-box-table .wp-editor-container {
|
43 |
clear: both;
|
44 |
}
|
|
|
|
|
|
|
|
|
45 |
.smart-cf-meta-box-table td .description {
|
46 |
font-size: 12px;
|
47 |
margin: 10px 0 0;
|
|
|
48 |
}
|
49 |
|
50 |
/** ==================================================
|
1 |
/**
|
2 |
* editor.css
|
3 |
+
* Version : 1.3.1
|
4 |
* Author : inc2734
|
5 |
* Created : September 23, 2014
|
6 |
+
* Modified : June 4, 2016
|
7 |
* License : GPLv2 or later
|
8 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
*/
|
39 |
.smart-cf-meta-box-table td label {
|
40 |
margin-right: 10px;
|
41 |
}
|
42 |
+
.smart-cf-meta-box-table .wp-editor-tools:after {
|
43 |
+
display: block;
|
44 |
+
}
|
45 |
.smart-cf-meta-box-table .wp-editor-container {
|
46 |
clear: both;
|
47 |
}
|
48 |
+
.smart-cf-meta-box-table td .instruction {
|
49 |
+
font-size: 14px;
|
50 |
+
margin: 0 0 10px;
|
51 |
+
}
|
52 |
.smart-cf-meta-box-table td .description {
|
53 |
font-size: 12px;
|
54 |
margin: 10px 0 0;
|
55 |
+
color: #888;
|
56 |
}
|
57 |
|
58 |
/** ==================================================
|
js/editor-wysiwyg.js
CHANGED
@@ -1,27 +1,69 @@
|
|
1 |
/**
|
2 |
* editor-wysiwyg.js
|
3 |
-
* Version :
|
4 |
* Author : inc2734
|
5 |
* Created : September 28, 2014
|
6 |
-
* Modified :
|
7 |
* License : GPLv2 or later
|
8 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
*/
|
10 |
jQuery( function( $ ) {
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
/**
|
13 |
* グループ追加ボタンを押したときに発火。
|
14 |
* wysiwyg エディター用のテキストエリアがあったら wysiwyg 化する。
|
15 |
*/
|
16 |
-
$( document ).on( 'smart-cf-after-add-group', function( e,
|
17 |
-
var
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
}
|
26 |
} );
|
27 |
} );
|
@@ -33,8 +75,17 @@ jQuery( function( $ ) {
|
|
33 |
$( document ).on( 'smart-cf-repeat-table-sortable-start', function( e, ui ) {
|
34 |
$( ui ).find( '.smart-cf-wp-editor' ).each( function( i, e ) {
|
35 |
var editor_id = $( this ).attr( 'id' );
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
} );
|
40 |
} );
|
@@ -46,10 +97,68 @@ jQuery( function( $ ) {
|
|
46 |
$( document ).on( 'smart-cf-repeat-table-sortable-stop', function( e, ui ) {
|
47 |
$( ui ).find( '.smart-cf-wp-editor' ).each( function( i, e ) {
|
48 |
var editor_id = $( this ).attr( 'id' );
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
} );
|
53 |
} );
|
54 |
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* editor-wysiwyg.js
|
3 |
+
* Version : 2.0.0
|
4 |
* Author : inc2734
|
5 |
* Created : September 28, 2014
|
6 |
+
* Modified : June 4, 2016
|
7 |
* License : GPLv2 or later
|
8 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
*/
|
10 |
jQuery( function( $ ) {
|
11 |
|
12 |
+
$( '.smart-cf-meta-box' ).each( function( i, e ) {
|
13 |
+
var wrapper = $( e );
|
14 |
+
var table_class = '.smart-cf-meta-box-table';
|
15 |
+
|
16 |
+
/**
|
17 |
+
* ロード時に wysiwyg エディター用のテキストエリアがあったら wysiwyg 化する。
|
18 |
+
*/
|
19 |
+
wrapper.find( '.smart-cf-wp-editor' ).each( function( i, e ) {
|
20 |
+
if ( $( this ).parents( table_class ).css( 'display' ) === 'none' ) {
|
21 |
+
return true;
|
22 |
+
}
|
23 |
+
$( e ).attr( 'id', $( e ).attr( 'name' ).replace( /(\[|\]|\-)/ig, '_' ) );
|
24 |
+
var editor_id = $( e ).attr( 'id' );
|
25 |
+
var wrap = $( e ).parents( '.wp-editor-wrap' );
|
26 |
+
initialize_editor( wrap, editor_id );
|
27 |
+
|
28 |
+
var mceinit = scf_generate_mceinit( editor_id );
|
29 |
+
tinyMCEPreInit.mceInit[editor_id] = mceinit;
|
30 |
+
if ( typeof tinymce !== 'undefined' ) {
|
31 |
+
tinymce.init( mceinit );
|
32 |
+
}
|
33 |
+
|
34 |
+
var qtinit = scf_generate_qtinit( editor_id );
|
35 |
+
tinyMCEPreInit.qtInit[editor_id] = qtinit;
|
36 |
+
if ( typeof quicktags !== 'undefined' ) {
|
37 |
+
quicktags( qtinit );
|
38 |
+
QTags._buttonsInit();
|
39 |
+
}
|
40 |
+
} );
|
41 |
+
} );
|
42 |
+
|
43 |
/**
|
44 |
* グループ追加ボタンを押したときに発火。
|
45 |
* wysiwyg エディター用のテキストエリアがあったら wysiwyg 化する。
|
46 |
*/
|
47 |
+
$( document ).on( 'smart-cf-after-add-group', function( e, data ) {
|
48 |
+
var button = data.button;
|
49 |
+
var clone = data.clone;
|
50 |
+
clone.find( '.smart-cf-wp-editor' ).each( function( i, e ) {
|
51 |
+
$( e ).attr( 'id', $( e ).attr( 'name' ).replace( /(\[|\]|\-)/ig, '_' ) );
|
52 |
+
var editor_id = $( e ).attr( 'id' );
|
53 |
+
var wrap = $( e ).parents( '.wp-editor-wrap' );
|
54 |
+
initialize_editor( wrap, editor_id );
|
55 |
+
|
56 |
+
var mceinit = scf_generate_mceinit( editor_id );
|
57 |
+
tinyMCEPreInit.mceInit[editor_id] = mceinit;
|
58 |
+
if ( typeof tinymce !== 'undefined' ) {
|
59 |
+
tinymce.init( mceinit );
|
60 |
+
}
|
61 |
+
|
62 |
+
var qtinit = scf_generate_qtinit( editor_id );
|
63 |
+
tinyMCEPreInit.qtInit[editor_id] = qtinit;
|
64 |
+
if ( typeof quicktags !== 'undefined' ) {
|
65 |
+
quicktags( qtinit );
|
66 |
+
QTags._buttonsInit();
|
67 |
}
|
68 |
} );
|
69 |
} );
|
75 |
$( document ).on( 'smart-cf-repeat-table-sortable-start', function( e, ui ) {
|
76 |
$( ui ).find( '.smart-cf-wp-editor' ).each( function( i, e ) {
|
77 |
var editor_id = $( this ).attr( 'id' );
|
78 |
+
|
79 |
+
tinymce.execCommand( 'mceRemoveEditor', false, editor_id );
|
80 |
+
|
81 |
+
var mceinit = scf_generate_mceinit( editor_id );
|
82 |
+
tinyMCEPreInit.mceInit[editor_id] = mceinit;
|
83 |
+
|
84 |
+
var qtinit = scf_generate_qtinit( editor_id );
|
85 |
+
tinyMCEPreInit.qtInit[editor_id] = qtinit;
|
86 |
+
if ( typeof quicktags !== 'undefined' ) {
|
87 |
+
quicktags( qtinit );
|
88 |
+
QTags._buttonsInit();
|
89 |
}
|
90 |
} );
|
91 |
} );
|
97 |
$( document ).on( 'smart-cf-repeat-table-sortable-stop', function( e, ui ) {
|
98 |
$( ui ).find( '.smart-cf-wp-editor' ).each( function( i, e ) {
|
99 |
var editor_id = $( this ).attr( 'id' );
|
100 |
+
|
101 |
+
var mceinit = scf_generate_mceinit( editor_id );
|
102 |
+
tinyMCEPreInit.mceInit[editor_id] = mceinit;
|
103 |
+
if ( typeof tinymce !== 'undefined' ) {
|
104 |
+
tinymce.init( mceinit );
|
105 |
+
}
|
106 |
+
|
107 |
+
var qtinit = scf_generate_qtinit( editor_id );
|
108 |
+
tinyMCEPreInit.qtInit[editor_id] = qtinit;
|
109 |
+
if ( typeof quicktags !== 'undefined' ) {
|
110 |
+
quicktags( qtinit );
|
111 |
+
QTags._buttonsInit();
|
112 |
}
|
113 |
} );
|
114 |
} );
|
115 |
|
116 |
+
function initialize_editor( wrap, editor_id ) {
|
117 |
+
wrap.attr( 'id', 'wp-' + editor_id + '-wrap' );
|
118 |
+
wrap.find( 'a.add_media' ).attr( 'data-editor', editor_id );
|
119 |
+
wrap.find( '.switch-tmce' )
|
120 |
+
.attr( 'data-wp-editor-id', editor_id )
|
121 |
+
.attr( 'id', editor_id + '-tmce' );
|
122 |
+
wrap.find( '.switch-html' )
|
123 |
+
.attr( 'data-wp-editor-id', editor_id )
|
124 |
+
.attr( 'id', editor_id + '-html' );
|
125 |
+
wrap.find( '.quicktags-toolbar' ).attr( 'id', 'qt_' + editor_id + '_toolbar' );
|
126 |
+
}
|
127 |
+
|
128 |
+
function scf_generate_mceinit( editor_id ) {
|
129 |
+
var mceinit;
|
130 |
+
if ( typeof tinyMCEPreInit.mceInit.content !== 'undefined' ) {
|
131 |
+
mceinit = $.extend( true, {}, tinyMCEPreInit.mceInit.content );
|
132 |
+
mceinit.selector = '#' + editor_id;
|
133 |
+
} else {
|
134 |
+
mceinit = {
|
135 |
+
content_css: ['../wp-includes/js/tinymce/skins/wordpress/wp-content.css', '../wp-content/plugins/smart-custom-fields/css/wysiwyg.css'],
|
136 |
+
menubar: false,
|
137 |
+
plugins: "hr,wplink,fullscreen,wordpress,textcolor,paste,charmap",
|
138 |
+
toolbar1: "bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,wp_adv,fullscreen",
|
139 |
+
toolbar2: "formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help,code",
|
140 |
+
convert_urls: false,
|
141 |
+
theme: "modern",
|
142 |
+
skin: "lightgray",
|
143 |
+
wp_autoresize_on: true,
|
144 |
+
wpautop: true,
|
145 |
+
selector: '#' + editor_id
|
146 |
+
};
|
147 |
+
}
|
148 |
+
return mceinit;
|
149 |
+
}
|
150 |
+
|
151 |
+
function scf_generate_qtinit( editor_id ) {
|
152 |
+
var qtinit;
|
153 |
+
if ( typeof tinyMCEPreInit.qtInit.content !== 'undefined' ) {
|
154 |
+
qtinit = $.extend( true, {}, tinyMCEPreInit.qtInit.content );
|
155 |
+
qtinit.id = editor_id;
|
156 |
+
} else {
|
157 |
+
qtinit = {
|
158 |
+
id: editor_id,
|
159 |
+
buttons: "strong,em,link,block,del,ins,img,ul,ol,li,code,more,close"
|
160 |
+
}
|
161 |
+
}
|
162 |
+
return qtinit;
|
163 |
+
}
|
164 |
+
} );
|
js/editor.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
/**
|
2 |
* editor.js
|
3 |
-
* Version :
|
4 |
* Author : inc2734
|
5 |
* Created : September 23, 2014
|
6 |
-
* Modified :
|
7 |
* License : GPLv2 or later
|
8 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
*/
|
@@ -15,43 +15,6 @@ jQuery( function( $ ) {
|
|
15 |
var btn_remove_repeat_group = wrapper.find( '.btn-remove-repeat-group' );
|
16 |
var table_class = '.smart-cf-meta-box-table';
|
17 |
var cnt = wrapper.find( table_class ).length;
|
18 |
-
var wrapper_index = i;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* ロード時に wysiwyg エディター用のテキストエリアがあったら wysiwyg 化する。
|
22 |
-
*/
|
23 |
-
wrapper.find( '.smart-cf-wp-editor' ).each( function( i, e ) {
|
24 |
-
if ( $( this ).parents( table_class ).css( 'display' ) !== 'none' ) {
|
25 |
-
$( this ).attr( 'id', 'smart-cf-wysiwyg-' + wrapper_index + '-' + cnt + '-' + i );
|
26 |
-
var editor_id = $( this ).attr( 'id' );
|
27 |
-
$( this ).parents( '.wp-editor-wrap' ).find( 'a.add_media' ).attr( 'data-editor', editor_id );
|
28 |
-
|
29 |
-
var init;
|
30 |
-
if ( typeof tinyMCEPreInit.mceInit.content !== 'undefined' ) {
|
31 |
-
init = $.extend( true, {}, tinyMCEPreInit.mceInit.content );
|
32 |
-
init.selector = '#' + editor_id;
|
33 |
-
} else {
|
34 |
-
init = {
|
35 |
-
content_css: ['../wp-includes/js/tinymce/skins/wordpress/wp-content.css', '../wp-content/plugins/smart-custom-fields/css/wysiwyg.css'],
|
36 |
-
menubar: false,
|
37 |
-
plugins: "hr,wplink,fullscreen,wordpress,textcolor,paste,charmap",
|
38 |
-
toolbar1: "bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,wp_adv,fullscreen",
|
39 |
-
toolbar2: "formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help,code",
|
40 |
-
convert_urls: false,
|
41 |
-
theme: "modern",
|
42 |
-
skin: "lightgray",
|
43 |
-
wp_autoresize_on: true,
|
44 |
-
wpautop: true,
|
45 |
-
selector: '#' + editor_id
|
46 |
-
};
|
47 |
-
}
|
48 |
-
tinyMCEPreInit.mceInit[editor_id] = init;
|
49 |
-
if ( typeof tinymce !== 'undefined' ) {
|
50 |
-
tinymce.init( init );
|
51 |
-
}
|
52 |
-
//tinymce.execCommand( 'mceAddEditor', false, editor_id );
|
53 |
-
}
|
54 |
-
} );
|
55 |
|
56 |
/**
|
57 |
* グループ追加ボタン
|
@@ -95,12 +58,8 @@ jQuery( function( $ ) {
|
|
95 |
}
|
96 |
} );
|
97 |
|
98 |
-
clone.find( '.smart-cf-wp-editor' ).each( function( i, e ) {
|
99 |
-
$( this ).attr( 'id', 'smart-cf-wysiwyg-' + wrapper_index + '-' + cnt + '-' + i );
|
100 |
-
} );
|
101 |
-
|
102 |
button.parent().after( clone.fadeIn( 'fast' ) );
|
103 |
-
button.trigger( 'smart-cf-after-add-group', button );
|
104 |
}
|
105 |
|
106 |
/**
|
1 |
/**
|
2 |
* editor.js
|
3 |
+
* Version : 2.0.0
|
4 |
* Author : inc2734
|
5 |
* Created : September 23, 2014
|
6 |
+
* Modified : June 4, 2016
|
7 |
* License : GPLv2 or later
|
8 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
*/
|
15 |
var btn_remove_repeat_group = wrapper.find( '.btn-remove-repeat-group' );
|
16 |
var table_class = '.smart-cf-meta-box-table';
|
17 |
var cnt = wrapper.find( table_class ).length;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
/**
|
20 |
* グループ追加ボタン
|
58 |
}
|
59 |
} );
|
60 |
|
|
|
|
|
|
|
|
|
61 |
button.parent().after( clone.fadeIn( 'fast' ) );
|
62 |
+
button.trigger( 'smart-cf-after-add-group', { button: button, clone: clone} );
|
63 |
}
|
64 |
|
65 |
/**
|
languages/smart-custom-fields-ja.mo
CHANGED
Binary file
|
languages/smart-custom-fields-ja.po
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
# This file is distributed under the same license as the Smart Custom Fields package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Smart Custom Fields 2.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/smart-custom-fields\n"
|
7 |
-
"POT-Creation-Date: 2016-
|
8 |
-
"PO-Revision-Date: 2016-
|
9 |
"Last-Translator: inc2734 <inc@2inc.org>\n"
|
10 |
"Language-Team: \n"
|
11 |
"Language: ja\n"
|
@@ -83,7 +83,7 @@ msgid "Add Field"
|
|
83 |
msgstr "フィールド追加"
|
84 |
|
85 |
#: classes/controller/class.settings.php:232
|
86 |
-
#: classes/fields/class.field-relation.php:
|
87 |
msgid "Post Types"
|
88 |
msgstr "投稿タイプ"
|
89 |
|
@@ -96,7 +96,7 @@ msgid "Roles"
|
|
96 |
msgstr "権限"
|
97 |
|
98 |
#: classes/controller/class.settings.php:290
|
99 |
-
#: classes/fields/class.field-taxonomy.php:
|
100 |
msgid "Taxonomies"
|
101 |
msgstr "タクソノミー"
|
102 |
|
@@ -108,42 +108,56 @@ msgstr "オプションページ"
|
|
108 |
msgid "Boolean"
|
109 |
msgstr "真偽値"
|
110 |
|
111 |
-
#: classes/fields/class.field-boolean.php:
|
112 |
msgid "Yes"
|
113 |
msgstr "はい"
|
114 |
|
115 |
-
#: classes/fields/class.field-boolean.php:
|
116 |
msgid "No"
|
117 |
msgstr "いいえ"
|
118 |
|
119 |
-
#: classes/fields/class.field-boolean.php:
|
120 |
-
#: classes/fields/class.field-colorpicker.php:
|
121 |
-
#: classes/fields/class.field-datepicker.php:
|
122 |
-
#: classes/fields/class.field-radio.php:
|
123 |
-
#: classes/fields/class.field-text.php:
|
124 |
-
#: classes/fields/class.field-wysiwyg.php:
|
125 |
msgid "Default"
|
126 |
msgstr "デフォルト"
|
127 |
|
128 |
-
#: classes/fields/class.field-boolean.php:
|
129 |
msgid "TRUE Label"
|
130 |
msgstr "TRUE ラベル"
|
131 |
|
132 |
-
#: classes/fields/class.field-boolean.php:
|
133 |
msgid "FALSE Label"
|
134 |
msgstr "FALSE ラベル"
|
135 |
|
136 |
-
#: classes/fields/class.field-boolean.php:
|
137 |
-
#: classes/fields/class.field-check.php:
|
138 |
-
#: classes/fields/class.field-colorpicker.php:
|
139 |
-
#: classes/fields/class.field-datepicker.php:
|
140 |
-
#: classes/fields/class.field-file.php:
|
141 |
-
#: classes/fields/class.field-radio.php:
|
142 |
-
#: classes/fields/class.field-relation.php:
|
143 |
-
#: classes/fields/class.field-select.php:
|
144 |
-
#: classes/fields/class.field-taxonomy.php:
|
145 |
-
#: classes/fields/class.field-textarea.php:
|
146 |
-
#: classes/fields/class.field-wysiwyg.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
msgid "Notes"
|
148 |
msgstr "注記"
|
149 |
|
@@ -151,20 +165,25 @@ msgstr "注記"
|
|
151 |
msgid "Check"
|
152 |
msgstr "チェックボックス"
|
153 |
|
154 |
-
#: classes/fields/class.field-check.php:
|
155 |
-
#: classes/fields/class.field-select.php:
|
156 |
msgid "Choices"
|
157 |
msgstr "選択肢"
|
158 |
|
159 |
-
#: classes/fields/class.field-check.php:
|
|
|
|
|
|
|
|
|
|
|
160 |
msgid "Display Direction"
|
161 |
msgstr "表示方向"
|
162 |
|
163 |
-
#: classes/fields/class.field-check.php:
|
164 |
msgid "horizontal"
|
165 |
msgstr "水平方向"
|
166 |
|
167 |
-
#: classes/fields/class.field-check.php:
|
168 |
msgid "vertical"
|
169 |
msgstr "垂直方向"
|
170 |
|
@@ -176,24 +195,24 @@ msgstr "カラーピッカー"
|
|
176 |
msgid "Date picker"
|
177 |
msgstr "日付ピッカー"
|
178 |
|
179 |
-
#: classes/fields/class.field-datepicker.php:
|
180 |
msgid "Date Format"
|
181 |
msgstr "日付のフォーマット"
|
182 |
|
183 |
-
#: classes/fields/class.field-datepicker.php:
|
184 |
msgid "e.g dd/mm/yy"
|
185 |
msgstr "例: dd/mm/yy"
|
186 |
|
187 |
-
#: classes/fields/class.field-datepicker.php:
|
188 |
msgid "Max Date"
|
189 |
msgstr "最大日付"
|
190 |
|
191 |
-
#: classes/fields/class.field-datepicker.php:
|
192 |
-
#: classes/fields/class.field-datepicker.php:
|
193 |
msgid "e.g +1m +1w"
|
194 |
msgstr "例: +1m +1w"
|
195 |
|
196 |
-
#: classes/fields/class.field-datepicker.php:
|
197 |
msgid "Min Date"
|
198 |
msgstr "最小日付"
|
199 |
|
@@ -201,11 +220,11 @@ msgstr "最小日付"
|
|
201 |
msgid "File"
|
202 |
msgstr "ファイル"
|
203 |
|
204 |
-
#: classes/fields/class.field-file.php:
|
205 |
msgid "Delete"
|
206 |
msgstr "削除"
|
207 |
|
208 |
-
#: classes/fields/class.field-file.php:
|
209 |
msgid "File Select"
|
210 |
msgstr "ファイル選択"
|
211 |
|
@@ -213,11 +232,11 @@ msgstr "ファイル選択"
|
|
213 |
msgid "Image"
|
214 |
msgstr "画像"
|
215 |
|
216 |
-
#: classes/fields/class.field-image.php:
|
217 |
msgid "Image Select"
|
218 |
msgstr "画像選択"
|
219 |
|
220 |
-
#: classes/fields/class.field-image.php:
|
221 |
msgid "Preview Size"
|
222 |
msgstr "プレビューサイズ"
|
223 |
|
@@ -229,14 +248,14 @@ msgstr "ラジオボタン"
|
|
229 |
msgid "Relation ( Post Types )"
|
230 |
msgstr "関連(投稿タイプ)"
|
231 |
|
232 |
-
#: classes/fields/class.field-relation.php:
|
233 |
-
#: classes/fields/class.field-taxonomy.php:
|
234 |
#, fuzzy
|
235 |
msgid "Search..."
|
236 |
msgstr "検索 …"
|
237 |
|
238 |
-
#: classes/fields/class.field-relation.php:
|
239 |
-
#: classes/fields/class.field-taxonomy.php:
|
240 |
msgid "Load more"
|
241 |
msgstr "さらに読み込む"
|
242 |
|
@@ -256,7 +275,7 @@ msgstr "テキスト"
|
|
256 |
msgid "Textarea"
|
257 |
msgstr "テキストエリア"
|
258 |
|
259 |
-
#: classes/fields/class.field-textarea.php:
|
260 |
msgid "Rows"
|
261 |
msgstr "行数"
|
262 |
|
@@ -264,8 +283,8 @@ msgstr "行数"
|
|
264 |
msgid "Wysiwyg"
|
265 |
msgstr "WYSIWYG"
|
266 |
|
267 |
-
#: classes/fields/class.field-wysiwyg.php:
|
268 |
-
#: classes/fields/class.field-wysiwyg.php:
|
269 |
msgid "Add Media"
|
270 |
msgstr "メディアを追加"
|
271 |
|
2 |
# This file is distributed under the same license as the Smart Custom Fields package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Smart Custom Fields 2.1.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/smart-custom-fields\n"
|
7 |
+
"POT-Creation-Date: 2016-06-06 11:47+0900\n"
|
8 |
+
"PO-Revision-Date: 2016-06-06 11:49+0900\n"
|
9 |
"Last-Translator: inc2734 <inc@2inc.org>\n"
|
10 |
"Language-Team: \n"
|
11 |
"Language: ja\n"
|
83 |
msgstr "フィールド追加"
|
84 |
|
85 |
#: classes/controller/class.settings.php:232
|
86 |
+
#: classes/fields/class.field-relation.php:214
|
87 |
msgid "Post Types"
|
88 |
msgstr "投稿タイプ"
|
89 |
|
96 |
msgstr "権限"
|
97 |
|
98 |
#: classes/controller/class.settings.php:290
|
99 |
+
#: classes/fields/class.field-taxonomy.php:217
|
100 |
msgid "Taxonomies"
|
101 |
msgstr "タクソノミー"
|
102 |
|
108 |
msgid "Boolean"
|
109 |
msgstr "真偽値"
|
110 |
|
111 |
+
#: classes/fields/class.field-boolean.php:39
|
112 |
msgid "Yes"
|
113 |
msgstr "はい"
|
114 |
|
115 |
+
#: classes/fields/class.field-boolean.php:40
|
116 |
msgid "No"
|
117 |
msgstr "いいえ"
|
118 |
|
119 |
+
#: classes/fields/class.field-boolean.php:83 classes/fields/class.field-check.php:117
|
120 |
+
#: classes/fields/class.field-colorpicker.php:103
|
121 |
+
#: classes/fields/class.field-datepicker.php:125
|
122 |
+
#: classes/fields/class.field-radio.php:116 classes/fields/class.field-select.php:91
|
123 |
+
#: classes/fields/class.field-text.php:66 classes/fields/class.field-textarea.php:79
|
124 |
+
#: classes/fields/class.field-wysiwyg.php:119
|
125 |
msgid "Default"
|
126 |
msgstr "デフォルト"
|
127 |
|
128 |
+
#: classes/fields/class.field-boolean.php:108
|
129 |
msgid "TRUE Label"
|
130 |
msgstr "TRUE ラベル"
|
131 |
|
132 |
+
#: classes/fields/class.field-boolean.php:118
|
133 |
msgid "FALSE Label"
|
134 |
msgstr "FALSE ラベル"
|
135 |
|
136 |
+
#: classes/fields/class.field-boolean.php:128
|
137 |
+
#: classes/fields/class.field-check.php:126
|
138 |
+
#: classes/fields/class.field-colorpicker.php:112
|
139 |
+
#: classes/fields/class.field-datepicker.php:189
|
140 |
+
#: classes/fields/class.field-file.php:93 classes/fields/class.field-image.php:94
|
141 |
+
#: classes/fields/class.field-radio.php:125
|
142 |
+
#: classes/fields/class.field-relation.php:235
|
143 |
+
#: classes/fields/class.field-select.php:100
|
144 |
+
#: classes/fields/class.field-taxonomy.php:236 classes/fields/class.field-text.php:75
|
145 |
+
#: classes/fields/class.field-textarea.php:88
|
146 |
+
#: classes/fields/class.field-wysiwyg.php:128
|
147 |
+
msgid "Instruction"
|
148 |
+
msgstr "説明文"
|
149 |
+
|
150 |
+
#: classes/fields/class.field-boolean.php:135
|
151 |
+
#: classes/fields/class.field-check.php:133
|
152 |
+
#: classes/fields/class.field-colorpicker.php:119
|
153 |
+
#: classes/fields/class.field-datepicker.php:196
|
154 |
+
#: classes/fields/class.field-file.php:100 classes/fields/class.field-image.php:101
|
155 |
+
#: classes/fields/class.field-radio.php:132
|
156 |
+
#: classes/fields/class.field-relation.php:242
|
157 |
+
#: classes/fields/class.field-select.php:107
|
158 |
+
#: classes/fields/class.field-taxonomy.php:243 classes/fields/class.field-text.php:82
|
159 |
+
#: classes/fields/class.field-textarea.php:95
|
160 |
+
#: classes/fields/class.field-wysiwyg.php:135
|
161 |
msgid "Notes"
|
162 |
msgstr "注記"
|
163 |
|
165 |
msgid "Check"
|
166 |
msgstr "チェックボックス"
|
167 |
|
168 |
+
#: classes/fields/class.field-check.php:87 classes/fields/class.field-radio.php:86
|
169 |
+
#: classes/fields/class.field-select.php:81
|
170 |
msgid "Choices"
|
171 |
msgstr "選択肢"
|
172 |
|
173 |
+
#: classes/fields/class.field-check.php:93 classes/fields/class.field-radio.php:92
|
174 |
+
#: classes/fields/class.field-select.php:87
|
175 |
+
msgid "If you want to separate the key and the value, enter as follows: key => value"
|
176 |
+
msgstr "もしキーと値を分けたい場合は次のように入力してください: キー => 値"
|
177 |
+
|
178 |
+
#: classes/fields/class.field-check.php:97 classes/fields/class.field-radio.php:96
|
179 |
msgid "Display Direction"
|
180 |
msgstr "表示方向"
|
181 |
|
182 |
+
#: classes/fields/class.field-check.php:101 classes/fields/class.field-radio.php:100
|
183 |
msgid "horizontal"
|
184 |
msgstr "水平方向"
|
185 |
|
186 |
+
#: classes/fields/class.field-check.php:102 classes/fields/class.field-radio.php:101
|
187 |
msgid "vertical"
|
188 |
msgstr "垂直方向"
|
189 |
|
195 |
msgid "Date picker"
|
196 |
msgstr "日付ピッカー"
|
197 |
|
198 |
+
#: classes/fields/class.field-datepicker.php:135
|
199 |
msgid "Date Format"
|
200 |
msgstr "日付のフォーマット"
|
201 |
|
202 |
+
#: classes/fields/class.field-datepicker.php:143
|
203 |
msgid "e.g dd/mm/yy"
|
204 |
msgstr "例: dd/mm/yy"
|
205 |
|
206 |
+
#: classes/fields/class.field-datepicker.php:153
|
207 |
msgid "Max Date"
|
208 |
msgstr "最大日付"
|
209 |
|
210 |
+
#: classes/fields/class.field-datepicker.php:161
|
211 |
+
#: classes/fields/class.field-datepicker.php:179
|
212 |
msgid "e.g +1m +1w"
|
213 |
msgstr "例: +1m +1w"
|
214 |
|
215 |
+
#: classes/fields/class.field-datepicker.php:171
|
216 |
msgid "Min Date"
|
217 |
msgstr "最小日付"
|
218 |
|
220 |
msgid "File"
|
221 |
msgstr "ファイル"
|
222 |
|
223 |
+
#: classes/fields/class.field-file.php:51 classes/fields/class.field-image.php:52
|
224 |
msgid "Delete"
|
225 |
msgstr "削除"
|
226 |
|
227 |
+
#: classes/fields/class.field-file.php:74
|
228 |
msgid "File Select"
|
229 |
msgstr "ファイル選択"
|
230 |
|
232 |
msgid "Image"
|
233 |
msgstr "画像"
|
234 |
|
235 |
+
#: classes/fields/class.field-image.php:74
|
236 |
msgid "Image Select"
|
237 |
msgstr "画像選択"
|
238 |
|
239 |
+
#: classes/fields/class.field-image.php:111
|
240 |
msgid "Preview Size"
|
241 |
msgstr "プレビューサイズ"
|
242 |
|
248 |
msgid "Relation ( Post Types )"
|
249 |
msgstr "関連(投稿タイプ)"
|
250 |
|
251 |
+
#: classes/fields/class.field-relation.php:192
|
252 |
+
#: classes/fields/class.field-taxonomy.php:195
|
253 |
#, fuzzy
|
254 |
msgid "Search..."
|
255 |
msgstr "検索 …"
|
256 |
|
257 |
+
#: classes/fields/class.field-relation.php:196
|
258 |
+
#: classes/fields/class.field-taxonomy.php:199
|
259 |
msgid "Load more"
|
260 |
msgstr "さらに読み込む"
|
261 |
|
275 |
msgid "Textarea"
|
276 |
msgstr "テキストエリア"
|
277 |
|
278 |
+
#: classes/fields/class.field-textarea.php:69
|
279 |
msgid "Rows"
|
280 |
msgstr "行数"
|
281 |
|
283 |
msgid "Wysiwyg"
|
284 |
msgstr "WYSIWYG"
|
285 |
|
286 |
+
#: classes/fields/class.field-wysiwyg.php:157
|
287 |
+
#: classes/fields/class.field-wysiwyg.php:158
|
288 |
msgid "Add Media"
|
289 |
msgstr "メディアを追加"
|
290 |
|
languages/smart-custom-fields.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Smart Custom Fields package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Smart Custom Fields 2.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/smart-custom-fields\n"
|
7 |
-
"POT-Creation-Date: 2016-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -78,7 +78,7 @@ msgid "Add Field"
|
|
78 |
msgstr ""
|
79 |
|
80 |
#: classes/controller/class.settings.php:232
|
81 |
-
#: classes/fields/class.field-relation.php:
|
82 |
msgid "Post Types"
|
83 |
msgstr ""
|
84 |
|
@@ -91,7 +91,7 @@ msgid "Roles"
|
|
91 |
msgstr ""
|
92 |
|
93 |
#: classes/controller/class.settings.php:290
|
94 |
-
#: classes/fields/class.field-taxonomy.php:
|
95 |
msgid "Taxonomies"
|
96 |
msgstr ""
|
97 |
|
@@ -103,47 +103,63 @@ msgstr ""
|
|
103 |
msgid "Boolean"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: classes/fields/class.field-boolean.php:
|
107 |
msgid "Yes"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: classes/fields/class.field-boolean.php:
|
111 |
msgid "No"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: classes/fields/class.field-boolean.php:
|
115 |
-
#: classes/fields/class.field-check.php:
|
116 |
-
#: classes/fields/class.field-colorpicker.php:
|
117 |
-
#: classes/fields/class.field-datepicker.php:
|
118 |
-
#: classes/fields/class.field-radio.php:
|
119 |
-
#: classes/fields/class.field-select.php:
|
120 |
-
#: classes/fields/class.field-text.php:
|
121 |
-
#: classes/fields/class.field-textarea.php:
|
122 |
-
#: classes/fields/class.field-wysiwyg.php:
|
123 |
msgid "Default"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: classes/fields/class.field-boolean.php:
|
127 |
msgid "TRUE Label"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: classes/fields/class.field-boolean.php:
|
131 |
msgid "FALSE Label"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: classes/fields/class.field-boolean.php:
|
135 |
-
#: classes/fields/class.field-check.php:
|
136 |
-
#: classes/fields/class.field-colorpicker.php:
|
137 |
-
#: classes/fields/class.field-datepicker.php:
|
138 |
-
#: classes/fields/class.field-file.php:
|
139 |
-
#: classes/fields/class.field-image.php:
|
140 |
-
#: classes/fields/class.field-radio.php:
|
141 |
-
#: classes/fields/class.field-relation.php:
|
142 |
-
#: classes/fields/class.field-select.php:
|
143 |
-
#: classes/fields/class.field-taxonomy.php:
|
144 |
-
#: classes/fields/class.field-text.php:
|
145 |
-
#: classes/fields/class.field-textarea.php:
|
146 |
-
#: classes/fields/class.field-wysiwyg.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
msgid "Notes"
|
148 |
msgstr ""
|
149 |
|
@@ -151,24 +167,30 @@ msgstr ""
|
|
151 |
msgid "Check"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: classes/fields/class.field-check.php:
|
155 |
-
#: classes/fields/class.field-radio.php:
|
156 |
-
#: classes/fields/class.field-select.php:
|
157 |
msgid "Choices"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: classes/fields/class.field-check.php:
|
161 |
-
#: classes/fields/class.field-radio.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
msgid "Display Direction"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: classes/fields/class.field-check.php:
|
166 |
-
#: classes/fields/class.field-radio.php:
|
167 |
msgid "horizontal"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: classes/fields/class.field-check.php:
|
171 |
-
#: classes/fields/class.field-radio.php:
|
172 |
msgid "vertical"
|
173 |
msgstr ""
|
174 |
|
@@ -180,24 +202,24 @@ msgstr ""
|
|
180 |
msgid "Date picker"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: classes/fields/class.field-datepicker.php:
|
184 |
msgid "Date Format"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: classes/fields/class.field-datepicker.php:
|
188 |
msgid "e.g dd/mm/yy"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: classes/fields/class.field-datepicker.php:
|
192 |
msgid "Max Date"
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: classes/fields/class.field-datepicker.php:
|
196 |
-
#: classes/fields/class.field-datepicker.php:
|
197 |
msgid "e.g +1m +1w"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: classes/fields/class.field-datepicker.php:
|
201 |
msgid "Min Date"
|
202 |
msgstr ""
|
203 |
|
@@ -205,12 +227,12 @@ msgstr ""
|
|
205 |
msgid "File"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: classes/fields/class.field-file.php:
|
209 |
-
#: classes/fields/class.field-image.php:
|
210 |
msgid "Delete"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: classes/fields/class.field-file.php:
|
214 |
msgid "File Select"
|
215 |
msgstr ""
|
216 |
|
@@ -218,11 +240,11 @@ msgstr ""
|
|
218 |
msgid "Image"
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: classes/fields/class.field-image.php:
|
222 |
msgid "Image Select"
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: classes/fields/class.field-image.php:
|
226 |
msgid "Preview Size"
|
227 |
msgstr ""
|
228 |
|
@@ -234,13 +256,13 @@ msgstr ""
|
|
234 |
msgid "Relation ( Post Types )"
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: classes/fields/class.field-relation.php:
|
238 |
-
#: classes/fields/class.field-taxonomy.php:
|
239 |
msgid "Search..."
|
240 |
msgstr ""
|
241 |
|
242 |
-
#: classes/fields/class.field-relation.php:
|
243 |
-
#: classes/fields/class.field-taxonomy.php:
|
244 |
msgid "Load more"
|
245 |
msgstr ""
|
246 |
|
@@ -260,7 +282,7 @@ msgstr ""
|
|
260 |
msgid "Textarea"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: classes/fields/class.field-textarea.php:
|
264 |
msgid "Rows"
|
265 |
msgstr ""
|
266 |
|
@@ -268,8 +290,8 @@ msgstr ""
|
|
268 |
msgid "Wysiwyg"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: classes/fields/class.field-wysiwyg.php:
|
272 |
-
#: classes/fields/class.field-wysiwyg.php:
|
273 |
msgid "Add Media"
|
274 |
msgstr ""
|
275 |
|
2 |
# This file is distributed under the same license as the Smart Custom Fields package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Smart Custom Fields 2.1.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/smart-custom-fields\n"
|
7 |
+
"POT-Creation-Date: 2016-06-06 02:45:51+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
78 |
msgstr ""
|
79 |
|
80 |
#: classes/controller/class.settings.php:232
|
81 |
+
#: classes/fields/class.field-relation.php:214
|
82 |
msgid "Post Types"
|
83 |
msgstr ""
|
84 |
|
91 |
msgstr ""
|
92 |
|
93 |
#: classes/controller/class.settings.php:290
|
94 |
+
#: classes/fields/class.field-taxonomy.php:217
|
95 |
msgid "Taxonomies"
|
96 |
msgstr ""
|
97 |
|
103 |
msgid "Boolean"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: classes/fields/class.field-boolean.php:39
|
107 |
msgid "Yes"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: classes/fields/class.field-boolean.php:40
|
111 |
msgid "No"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: classes/fields/class.field-boolean.php:83
|
115 |
+
#: classes/fields/class.field-check.php:117
|
116 |
+
#: classes/fields/class.field-colorpicker.php:103
|
117 |
+
#: classes/fields/class.field-datepicker.php:125
|
118 |
+
#: classes/fields/class.field-radio.php:116
|
119 |
+
#: classes/fields/class.field-select.php:91
|
120 |
+
#: classes/fields/class.field-text.php:66
|
121 |
+
#: classes/fields/class.field-textarea.php:79
|
122 |
+
#: classes/fields/class.field-wysiwyg.php:119
|
123 |
msgid "Default"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: classes/fields/class.field-boolean.php:108
|
127 |
msgid "TRUE Label"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: classes/fields/class.field-boolean.php:118
|
131 |
msgid "FALSE Label"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: classes/fields/class.field-boolean.php:128
|
135 |
+
#: classes/fields/class.field-check.php:126
|
136 |
+
#: classes/fields/class.field-colorpicker.php:112
|
137 |
+
#: classes/fields/class.field-datepicker.php:189
|
138 |
+
#: classes/fields/class.field-file.php:93
|
139 |
+
#: classes/fields/class.field-image.php:94
|
140 |
+
#: classes/fields/class.field-radio.php:125
|
141 |
+
#: classes/fields/class.field-relation.php:235
|
142 |
+
#: classes/fields/class.field-select.php:100
|
143 |
+
#: classes/fields/class.field-taxonomy.php:236
|
144 |
+
#: classes/fields/class.field-text.php:75
|
145 |
+
#: classes/fields/class.field-textarea.php:88
|
146 |
+
#: classes/fields/class.field-wysiwyg.php:128
|
147 |
+
msgid "Instruction"
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: classes/fields/class.field-boolean.php:135
|
151 |
+
#: classes/fields/class.field-check.php:133
|
152 |
+
#: classes/fields/class.field-colorpicker.php:119
|
153 |
+
#: classes/fields/class.field-datepicker.php:196
|
154 |
+
#: classes/fields/class.field-file.php:100
|
155 |
+
#: classes/fields/class.field-image.php:101
|
156 |
+
#: classes/fields/class.field-radio.php:132
|
157 |
+
#: classes/fields/class.field-relation.php:242
|
158 |
+
#: classes/fields/class.field-select.php:107
|
159 |
+
#: classes/fields/class.field-taxonomy.php:243
|
160 |
+
#: classes/fields/class.field-text.php:82
|
161 |
+
#: classes/fields/class.field-textarea.php:95
|
162 |
+
#: classes/fields/class.field-wysiwyg.php:135
|
163 |
msgid "Notes"
|
164 |
msgstr ""
|
165 |
|
167 |
msgid "Check"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: classes/fields/class.field-check.php:87
|
171 |
+
#: classes/fields/class.field-radio.php:86
|
172 |
+
#: classes/fields/class.field-select.php:81
|
173 |
msgid "Choices"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: classes/fields/class.field-check.php:93
|
177 |
+
#: classes/fields/class.field-radio.php:92
|
178 |
+
#: classes/fields/class.field-select.php:87
|
179 |
+
msgid "If you want to separate the key and the value, enter as follows: key => value"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: classes/fields/class.field-check.php:97
|
183 |
+
#: classes/fields/class.field-radio.php:96
|
184 |
msgid "Display Direction"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: classes/fields/class.field-check.php:101
|
188 |
+
#: classes/fields/class.field-radio.php:100
|
189 |
msgid "horizontal"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: classes/fields/class.field-check.php:102
|
193 |
+
#: classes/fields/class.field-radio.php:101
|
194 |
msgid "vertical"
|
195 |
msgstr ""
|
196 |
|
202 |
msgid "Date picker"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: classes/fields/class.field-datepicker.php:135
|
206 |
msgid "Date Format"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: classes/fields/class.field-datepicker.php:143
|
210 |
msgid "e.g dd/mm/yy"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: classes/fields/class.field-datepicker.php:153
|
214 |
msgid "Max Date"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: classes/fields/class.field-datepicker.php:161
|
218 |
+
#: classes/fields/class.field-datepicker.php:179
|
219 |
msgid "e.g +1m +1w"
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: classes/fields/class.field-datepicker.php:171
|
223 |
msgid "Min Date"
|
224 |
msgstr ""
|
225 |
|
227 |
msgid "File"
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: classes/fields/class.field-file.php:51
|
231 |
+
#: classes/fields/class.field-image.php:52
|
232 |
msgid "Delete"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: classes/fields/class.field-file.php:74
|
236 |
msgid "File Select"
|
237 |
msgstr ""
|
238 |
|
240 |
msgid "Image"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: classes/fields/class.field-image.php:74
|
244 |
msgid "Image Select"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: classes/fields/class.field-image.php:111
|
248 |
msgid "Preview Size"
|
249 |
msgstr ""
|
250 |
|
256 |
msgid "Relation ( Post Types )"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: classes/fields/class.field-relation.php:192
|
260 |
+
#: classes/fields/class.field-taxonomy.php:195
|
261 |
msgid "Search..."
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: classes/fields/class.field-relation.php:196
|
265 |
+
#: classes/fields/class.field-taxonomy.php:199
|
266 |
msgid "Load more"
|
267 |
msgstr ""
|
268 |
|
282 |
msgid "Textarea"
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: classes/fields/class.field-textarea.php:69
|
286 |
msgid "Rows"
|
287 |
msgstr ""
|
288 |
|
290 |
msgid "Wysiwyg"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: classes/fields/class.field-wysiwyg.php:157
|
294 |
+
#: classes/fields/class.field-wysiwyg.php:158
|
295 |
msgid "Add Media"
|
296 |
msgstr ""
|
297 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
|
|
4 |
Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.5.2
|
7 |
-
Stable tag: 2.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -125,6 +125,11 @@ You can send your own language pack to me.
|
|
125 |
|
126 |
== Changelog ==
|
127 |
|
|
|
|
|
|
|
|
|
|
|
128 |
= 2.0.0 =
|
129 |
* Refactoring
|
130 |
* Added meta data of custom options page.
|
4 |
Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.5.2
|
7 |
+
Stable tag: 2.1.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
125 |
|
126 |
== Changelog ==
|
127 |
|
128 |
+
= 2.1.0 =
|
129 |
+
* Support separated key and value in select, checkbox, radio.
|
130 |
+
* Added switching editor mode tab in wysiwyg field.
|
131 |
+
* Added instruction of field option.
|
132 |
+
|
133 |
= 2.0.0 =
|
134 |
* Refactoring
|
135 |
* Added meta data of custom options page.
|
smart-custom-fields.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Plugin name: Smart Custom Fields
|
4 |
* Plugin URI: https://github.com/inc2734/smart-custom-fields/
|
5 |
* Description: Smart Custom Fields is a simple plugin that management custom fields.
|
6 |
-
* Version: 2.0
|
7 |
* Author: inc2734
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created: October 9, 2014
|
10 |
-
* Modified:
|
11 |
* Text Domain: smart-custom-fields
|
12 |
* Domain Path: /languages
|
13 |
* License: GPLv2 or later
|
3 |
* Plugin name: Smart Custom Fields
|
4 |
* Plugin URI: https://github.com/inc2734/smart-custom-fields/
|
5 |
* Description: Smart Custom Fields is a simple plugin that management custom fields.
|
6 |
+
* Version: 2.1.0
|
7 |
* Author: inc2734
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created: October 9, 2014
|
10 |
+
* Modified: June 4, 2016
|
11 |
* Text Domain: smart-custom-fields
|
12 |
* Domain Path: /languages
|
13 |
* License: GPLv2 or later
|