Version Description
Bugfix: combination of the fieldset type and the normal type.
Download this release
Release Info
Developer | Hiroaki Miyashita |
Plugin | Custom Field Template |
Version | 1.8.3 |
Comparing to | |
See all releases |
Code changes from version 1.8.2 to 1.8.3
- custom-field-template.php +10 -8
- readme.txt +4 -1
custom-field-template.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Custom Field Template
|
|
4 |
Plugin URI: http://wpgogo.com/development/custom-field-template.html
|
5 |
Description: This plugin adds the default custom fields on the Write Post/Page.
|
6 |
Author: Hiroaki Miyashita
|
7 |
-
Version: 1.8.
|
8 |
Author URI: http://wpgogo.com/
|
9 |
*/
|
10 |
|
@@ -727,7 +727,7 @@ type = file';
|
|
727 |
endfor;
|
728 |
endif;
|
729 |
|
730 |
-
return $content;
|
731 |
}
|
732 |
|
733 |
function custom_field_template_admin() {
|
@@ -2595,7 +2595,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2595 |
if ( is_numeric($data['parentSN']) ) $field_key = $data['parentSN'];
|
2596 |
$name = $this->sanitize_name( $title );
|
2597 |
$title = $wpdb->escape(stripcslashes(trim($title)));
|
2598 |
-
|
2599 |
switch ( $data['type'] ) :
|
2600 |
case 'fieldset_open' :
|
2601 |
$save_value[$title][0] = count($_REQUEST[$name]);
|
@@ -2820,6 +2820,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2820 |
if ( $_REQUEST[$this->sanitize_name($title)] ) $fieldsetcounter = count($_REQUEST[$this->sanitize_name($title)])-1;
|
2821 |
else if ( $_REQUEST['post'] ) $fieldsetcounter = $this->get_post_meta( $_REQUEST['post'], $title, true )-1;
|
2822 |
else $fieldsetcounter = 0;
|
|
|
2823 |
endif;
|
2824 |
if ( is_array($fieldset) ) :
|
2825 |
if ( !$tmp_parentSN2[$title] ) $tmp_parentSN2[$title] = $tmp_parentSN;
|
@@ -2868,10 +2869,12 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2868 |
for($i=0;$i<$fieldsetcounter;$i++) :
|
2869 |
$returndata = array_merge($returndata, $fieldset);
|
2870 |
endfor;
|
2871 |
-
|
2872 |
$groupcounter = (int)$this->get_post_meta( $_REQUEST['post_ID'], $title, true );
|
2873 |
-
if ( $groupcounter == 0 ) $groupcounter =
|
2874 |
-
if ( $_REQUEST[$this->sanitize_name($title)]
|
|
|
|
|
|
|
2875 |
unset($fieldset, $tmp_parentSN2);
|
2876 |
endif;
|
2877 |
unset($counter);
|
@@ -2891,7 +2894,6 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2891 |
endforeach;
|
2892 |
endif;
|
2893 |
}
|
2894 |
-
|
2895 |
return $returndata;
|
2896 |
}
|
2897 |
|
@@ -3226,7 +3228,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
3226 |
|
3227 |
if ( $button === true )
|
3228 |
$output .= '<p><input type="submit" value="' . $search_label . '" class="cftsearch_submit" /></p>' . "\n";
|
3229 |
-
$output .= '<input type="hidden" name="cftsearch_submit" value="1"
|
3230 |
$output .= '</form>' . "\n";
|
3231 |
else :
|
3232 |
$fields = $this->get_custom_fields( $template );
|
4 |
Plugin URI: http://wpgogo.com/development/custom-field-template.html
|
5 |
Description: This plugin adds the default custom fields on the Write Post/Page.
|
6 |
Author: Hiroaki Miyashita
|
7 |
+
Version: 1.8.3
|
8 |
Author URI: http://wpgogo.com/
|
9 |
*/
|
10 |
|
727 |
endfor;
|
728 |
endif;
|
729 |
|
730 |
+
return do_shortcode($content);
|
731 |
}
|
732 |
|
733 |
function custom_field_template_admin() {
|
2595 |
if ( is_numeric($data['parentSN']) ) $field_key = $data['parentSN'];
|
2596 |
$name = $this->sanitize_name( $title );
|
2597 |
$title = $wpdb->escape(stripcslashes(trim($title)));
|
2598 |
+
|
2599 |
switch ( $data['type'] ) :
|
2600 |
case 'fieldset_open' :
|
2601 |
$save_value[$title][0] = count($_REQUEST[$name]);
|
2820 |
if ( $_REQUEST[$this->sanitize_name($title)] ) $fieldsetcounter = count($_REQUEST[$this->sanitize_name($title)])-1;
|
2821 |
else if ( $_REQUEST['post'] ) $fieldsetcounter = $this->get_post_meta( $_REQUEST['post'], $title, true )-1;
|
2822 |
else $fieldsetcounter = 0;
|
2823 |
+
if ( $data['multiple'] ) $fieldset_multiple = 1;
|
2824 |
endif;
|
2825 |
if ( is_array($fieldset) ) :
|
2826 |
if ( !$tmp_parentSN2[$title] ) $tmp_parentSN2[$title] = $tmp_parentSN;
|
2869 |
for($i=0;$i<$fieldsetcounter;$i++) :
|
2870 |
$returndata = array_merge($returndata, $fieldset);
|
2871 |
endfor;
|
|
|
2872 |
$groupcounter = (int)$this->get_post_meta( $_REQUEST['post_ID'], $title, true );
|
2873 |
+
if ( $groupcounter == 0 ) $groupcounter = $fieldsetcounter;
|
2874 |
+
if ( $_REQUEST[$this->sanitize_name($title)] && $fieldset_multiple ) :
|
2875 |
+
$gap += ($groupcounter - count($_REQUEST[$this->sanitize_name($title)]))*count($fieldset);
|
2876 |
+
unset($fieldset_multiple);
|
2877 |
+
endif;
|
2878 |
unset($fieldset, $tmp_parentSN2);
|
2879 |
endif;
|
2880 |
unset($counter);
|
2894 |
endforeach;
|
2895 |
endif;
|
2896 |
}
|
|
|
2897 |
return $returndata;
|
2898 |
}
|
2899 |
|
3228 |
|
3229 |
if ( $button === true )
|
3230 |
$output .= '<p><input type="submit" value="' . $search_label . '" class="cftsearch_submit" /></p>' . "\n";
|
3231 |
+
$output .= '<input type="hidden" name="cftsearch_submit" value="1" />' . "\n";
|
3232 |
$output .= '</form>' . "\n";
|
3233 |
else :
|
3234 |
$fields = $this->get_custom_fields( $template );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wpgogo.com/development/custom-field-template.html
|
|
4 |
Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
|
5 |
Requires at least: 2.1
|
6 |
Tested up to: 3.1
|
7 |
-
Stable tag: 1.8.
|
8 |
|
9 |
This plugin adds the default custom fields on the Write Post/Page.
|
10 |
|
@@ -103,6 +103,9 @@ See the default template and modify it.
|
|
103 |
|
104 |
== Changelog ==
|
105 |
|
|
|
|
|
|
|
106 |
= 1.8.2 =
|
107 |
Bugfix: multiple options for the fieldset type.
|
108 |
|
4 |
Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
|
5 |
Requires at least: 2.1
|
6 |
Tested up to: 3.1
|
7 |
+
Stable tag: 1.8.3
|
8 |
|
9 |
This plugin adds the default custom fields on the Write Post/Page.
|
10 |
|
103 |
|
104 |
== Changelog ==
|
105 |
|
106 |
+
= 1.8.3 =
|
107 |
+
Bugfix: combination of the fieldset type and the normal type.
|
108 |
+
|
109 |
= 1.8.2 =
|
110 |
Bugfix: multiple options for the fieldset type.
|
111 |
|