Custom Field Template - Version 1.4.8

Version Description

  • Bugfix: file type.
Download this release

Release Info

Developer Hiroaki Miyashita
Plugin Icon 128x128 Custom Field Template
Version 1.4.8
Comparing to
See all releases

Code changes from version 1.4.7 to 1.4.8

Files changed (2) hide show
  1. custom-field-template.php +6 -7
  2. 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.4.7
8
  Author URI: http://wpgogo.com/
9
  */
10
 
@@ -1449,7 +1449,7 @@ jQuery(this).addClass("closed");
1449
  endif;
1450
 
1451
  $out .=
1452
- '<dl id="dl_' . $name . $sid . $cftnum . '">' .
1453
  '<dt><span' . $hide . '>' . $title . '</span>'.$addfield;
1454
 
1455
  if( $clearButton == true ) {
@@ -1529,7 +1529,7 @@ jQuery(this).addClass("closed");
1529
  endif;
1530
 
1531
  $out .=
1532
- '<dl id="dl_' . $name . $sid . $cftnum . '">' .
1533
  '<dt><span' . $hide . '><label for="' . $name . $sid . $cftnum . '">' . $title . '</label></span>'.$addfield.'</dt>' .
1534
  '<dd>';
1535
 
@@ -1651,7 +1651,7 @@ jQuery(this).addClass("closed");
1651
  endforeach;
1652
 
1653
  $out .=
1654
- '<dl id="dl_' . $name . $sid . $cftnum . '">' .
1655
  '<dt><span' . $hide . '><label for="' . $name . $sid . $cftnum . '">' . $title . '</label></span><br />' . $media . $switch . '</dt>' .
1656
  '<dd>';
1657
 
@@ -1703,7 +1703,7 @@ jQuery(this).addClass("closed");
1703
  endif;
1704
 
1705
  $out .=
1706
- '<dl id="dl_' . $name . $sid . $cftnum . '">' .
1707
  '<dt><span' . $hide . '><label for="' . $name . $sid . $cftnum . '">' . $title . '</label></span>'.$addfield.'</dt>' .
1708
  '<dd>';
1709
 
@@ -2256,7 +2256,6 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
2256
  foreach( $val2 as $key3 => $val3 ) :
2257
  foreach( $val3 as $key4 => $val4 ) :
2258
  if ( !empty($val['name'][$key3][$key4]) ) :
2259
- $key = $wpdb->escape(stripcslashes(trim($key)));
2260
  $tmpfiles[$key][$key3][$key4]['name'] = $val['name'][$key3][$key4];
2261
  $tmpfiles[$key][$key3][$key4]['type'] = $val['type'][$key3][$key4];
2262
  $tmpfiles[$key][$key3][$key4]['tmp_name'] = $val['tmp_name'][$key3][$key4];
@@ -2317,7 +2316,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
2317
  if ( $_REQUEST[$name.'_delete'][$field_key][$data['cftnum']] ) :
2318
  wp_delete_attachment($value);
2319
  endif;
2320
- if( isset($tmpfiles[$title][$field_key][$data['cftnum']]) ) :
2321
  $_FILES[$title] = $tmpfiles[$name][$field_key][$data['cftnum']];
2322
  if ( $value ) :
2323
  wp_delete_attachment($value);
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.4.8
8
  Author URI: http://wpgogo.com/
9
  */
10
 
1449
  endif;
1450
 
1451
  $out .=
1452
+ '<dl id="dl_' . $name . $sid . '_' . $cftnum . '">' .
1453
  '<dt><span' . $hide . '>' . $title . '</span>'.$addfield;
1454
 
1455
  if( $clearButton == true ) {
1529
  endif;
1530
 
1531
  $out .=
1532
+ '<dl id="dl_' . $name . $sid . '_' . $cftnum . '">' .
1533
  '<dt><span' . $hide . '><label for="' . $name . $sid . $cftnum . '">' . $title . '</label></span>'.$addfield.'</dt>' .
1534
  '<dd>';
1535
 
1651
  endforeach;
1652
 
1653
  $out .=
1654
+ '<dl id="dl_' . $name . $sid . '_' . $cftnum . '">' .
1655
  '<dt><span' . $hide . '><label for="' . $name . $sid . $cftnum . '">' . $title . '</label></span><br />' . $media . $switch . '</dt>' .
1656
  '<dd>';
1657
 
1703
  endif;
1704
 
1705
  $out .=
1706
+ '<dl id="dl_' . $name . $sid . '_' . $cftnum . '">' .
1707
  '<dt><span' . $hide . '><label for="' . $name . $sid . $cftnum . '">' . $title . '</label></span>'.$addfield.'</dt>' .
1708
  '<dd>';
1709
 
2256
  foreach( $val2 as $key3 => $val3 ) :
2257
  foreach( $val3 as $key4 => $val4 ) :
2258
  if ( !empty($val['name'][$key3][$key4]) ) :
 
2259
  $tmpfiles[$key][$key3][$key4]['name'] = $val['name'][$key3][$key4];
2260
  $tmpfiles[$key][$key3][$key4]['type'] = $val['type'][$key3][$key4];
2261
  $tmpfiles[$key][$key3][$key4]['tmp_name'] = $val['tmp_name'][$key3][$key4];
2316
  if ( $_REQUEST[$name.'_delete'][$field_key][$data['cftnum']] ) :
2317
  wp_delete_attachment($value);
2318
  endif;
2319
+ if( isset($tmpfiles[$name][$field_key][$data['cftnum']]) ) :
2320
  $_FILES[$title] = $tmpfiles[$name][$field_key][$data['cftnum']];
2321
  if ( $value ) :
2322
  wp_delete_attachment($value);
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: 2.8.5
7
- Stable tag: 1.4.7
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
@@ -98,6 +98,9 @@ See the default template and modify it.
98
 
99
  == Changelog ==
100
 
 
 
 
101
  = 1.4.7 =
102
  * Bugfix: duplicate save_post action.
103
  * Bugfix: file type.
4
  Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
5
  Requires at least: 2.1
6
  Tested up to: 2.8.5
7
+ Stable tag: 1.4.8
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
98
 
99
  == Changelog ==
100
 
101
+ = 1.4.8 =
102
+ * Bugfix: file type.
103
+
104
  = 1.4.7 =
105
  * Bugfix: duplicate save_post action.
106
  * Bugfix: file type.