Custom Field Template - Version 1.9

Version Description

  • Bugfix: inconsistency of valueLabel and valueLabels.
Download this release

Release Info

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

Code changes from version 1.8.9 to 1.9

Files changed (2) hide show
  1. custom-field-template.php +9 -11
  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.8.9
8
  Author URI: http://wpgogo.com/
9
  */
10
 
@@ -1679,7 +1679,7 @@ jQuery(this).addClass("closed");
1679
  }
1680
 
1681
  function make_radio( $name, $sid, $data ) {
1682
- $cftnum = $values = $valueLabel = $valueLabels = $clearButton = $default = $hideKey = $label = $code = $class = $style = $before = $after = $multipleButton = $onclick = $ondblclick = $onkeydown = $onkeypress = $onkeyup = $onmousedown = $onmouseup = $onmouseover = $onmouseout = $onmousemove = $onfocus = $onblur = $onchange = $onselect = '';
1683
  $hide = $addfield = $out = '';
1684
  extract($data);
1685
  $options = $this->get_custom_field_template_data();
@@ -1689,6 +1689,7 @@ jQuery(this).addClass("closed");
1689
 
1690
  if ( isset($code) && is_numeric($code) ) :
1691
  eval(stripcslashes($options['php'][$code]));
 
1692
  endif;
1693
 
1694
  if ( !isset($_REQUEST['default']) || (isset($_REQUEST['default']) && $_REQUEST['default'] != true) ) $_REQUEST['default'] = false;
@@ -1703,14 +1704,12 @@ jQuery(this).addClass("closed");
1703
  if ( empty($ct_value) ) :
1704
  $ct_value = !empty($startNum) ? $startNum-1 : 1;
1705
  endif;
1706
-
1707
- if ( !empty($valueLabel) ) $valueLabels = $valueLabel;
1708
-
1709
  if ( $hideKey == true ) $hide = ' class="hideKey"';
1710
  if ( !empty($class) ) $class = ' class="' . $class . '"';
1711
  if ( !empty($style) ) $style = ' style="' . $style . '"';
1712
 
1713
- if ( !empty($label) && $options['custom_field_template_replace_keys_by_labels'] )
1714
  $title = stripcslashes($label);
1715
 
1716
  $event = array('onclick' => $onclick, 'ondblclick' => $ondblclick, 'onkeydown' => $onkeydown, 'onkeypress' => $onkeypress, 'onkeyup' => $onkeyup, 'onmousedown' => $onmousedown, 'onmouseup' => $onmouseup, 'onmouseover' => $onmouseover, 'onmouseout' => $onmouseout, 'onmousemove' => $onmousemove, 'onfocus' => $onfocus, 'onblur' => $onblur, 'onchange' => $onchange, 'onselect' => $onselect);
@@ -1740,12 +1739,12 @@ jQuery(this).addClass("closed");
1740
  '</dt>' .
1741
  '<dd>';
1742
 
1743
- if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
1744
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1745
  $i = 0;
1746
 
1747
  $out .= trim($before).'<input name="' . $name . '[' . $sid . '][' . $cftnum . ']" value="" type="hidden" />';
1748
-
1749
  if ( is_array($values) ) :
1750
  foreach( $values as $val ) {
1751
  $id = $name . '_' . $this->sanitize_name( $val ) . '_' . $sid . '_' . $cftnum;
@@ -1768,7 +1767,7 @@ jQuery(this).addClass("closed");
1768
  }
1769
 
1770
  function make_select( $name, $sid, $data ) {
1771
- $cftnum = $values = $valueLabel = $valueLabels = $default = $hideKey = $label = $code = $class = $style = $before = $after = $selectLabel = $multipleButton = $onclick = $ondblclick = $onkeydown = $onkeypress = $onkeyup = $onmousedown = $onmouseup = $onmouseover = $onmouseout = $onmousemove = $onfocus = $onblur = $onchange = $onselect = '';
1772
  $hide = $addfield = $out = '';
1773
  extract($data);
1774
  $options = $this->get_custom_field_template_data();
@@ -1778,6 +1777,7 @@ jQuery(this).addClass("closed");
1778
 
1779
  if ( isset($code) && is_numeric($code) ) :
1780
  eval(stripcslashes($options['php'][$code]));
 
1781
  endif;
1782
 
1783
  if ( !isset($_REQUEST['default']) || (isset($_REQUEST['default']) && $_REQUEST['default'] != true) ) $_REQUEST['default'] = false;
@@ -1793,8 +1793,6 @@ jQuery(this).addClass("closed");
1793
  $ct_value = !empty($startNum) ? $startNum-1 : 1;
1794
  endif;
1795
 
1796
- if ( !empty($valueLabel) ) $valueLabels = $valueLabel;
1797
-
1798
  if ( $hideKey == true ) $hide = ' class="hideKey"';
1799
  if ( !empty($class) ) $class = ' class="' . $class . '"';
1800
  if ( !empty($style) ) $style = ' style="' . $style . '"';
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.9
8
  Author URI: http://wpgogo.com/
9
  */
10
 
1679
  }
1680
 
1681
  function make_radio( $name, $sid, $data ) {
1682
+ $cftnum = $values = $valueLabels = $clearButton = $default = $hideKey = $label = $code = $class = $style = $before = $after = $multipleButton = $onclick = $ondblclick = $onkeydown = $onkeypress = $onkeyup = $onmousedown = $onmouseup = $onmouseover = $onmouseout = $onmousemove = $onfocus = $onblur = $onchange = $onselect = '';
1683
  $hide = $addfield = $out = '';
1684
  extract($data);
1685
  $options = $this->get_custom_field_template_data();
1689
 
1690
  if ( isset($code) && is_numeric($code) ) :
1691
  eval(stripcslashes($options['php'][$code]));
1692
+ if ( !empty($valueLabel) && is_array($valueLabel) ) $valueLabels = $valueLabel;
1693
  endif;
1694
 
1695
  if ( !isset($_REQUEST['default']) || (isset($_REQUEST['default']) && $_REQUEST['default'] != true) ) $_REQUEST['default'] = false;
1704
  if ( empty($ct_value) ) :
1705
  $ct_value = !empty($startNum) ? $startNum-1 : 1;
1706
  endif;
1707
+
 
 
1708
  if ( $hideKey == true ) $hide = ' class="hideKey"';
1709
  if ( !empty($class) ) $class = ' class="' . $class . '"';
1710
  if ( !empty($style) ) $style = ' style="' . $style . '"';
1711
 
1712
+ if ( !empty($label) && !empty($options['custom_field_template_replace_keys_by_labels']) )
1713
  $title = stripcslashes($label);
1714
 
1715
  $event = array('onclick' => $onclick, 'ondblclick' => $ondblclick, 'onkeydown' => $onkeydown, 'onkeypress' => $onkeypress, 'onkeyup' => $onkeyup, 'onmousedown' => $onmousedown, 'onmouseup' => $onmouseup, 'onmouseover' => $onmouseover, 'onmouseout' => $onmouseout, 'onmousemove' => $onmousemove, 'onfocus' => $onfocus, 'onblur' => $onblur, 'onchange' => $onchange, 'onselect' => $onselect);
1739
  '</dt>' .
1740
  '<dd>';
1741
 
1742
+ if ( !empty($label) && empty($options['custom_field_template_replace_keys_by_labels']) )
1743
  $out .= '<p class="label">' . stripcslashes($label) . '</p>';
1744
  $i = 0;
1745
 
1746
  $out .= trim($before).'<input name="' . $name . '[' . $sid . '][' . $cftnum . ']" value="" type="hidden" />';
1747
+
1748
  if ( is_array($values) ) :
1749
  foreach( $values as $val ) {
1750
  $id = $name . '_' . $this->sanitize_name( $val ) . '_' . $sid . '_' . $cftnum;
1767
  }
1768
 
1769
  function make_select( $name, $sid, $data ) {
1770
+ $cftnum = $values = $valueLabels = $default = $hideKey = $label = $code = $class = $style = $before = $after = $selectLabel = $multipleButton = $onclick = $ondblclick = $onkeydown = $onkeypress = $onkeyup = $onmousedown = $onmouseup = $onmouseover = $onmouseout = $onmousemove = $onfocus = $onblur = $onchange = $onselect = '';
1771
  $hide = $addfield = $out = '';
1772
  extract($data);
1773
  $options = $this->get_custom_field_template_data();
1777
 
1778
  if ( isset($code) && is_numeric($code) ) :
1779
  eval(stripcslashes($options['php'][$code]));
1780
+ if ( !empty($valueLabel) && is_array($valueLabel) ) $valueLabels = $valueLabel;
1781
  endif;
1782
 
1783
  if ( !isset($_REQUEST['default']) || (isset($_REQUEST['default']) && $_REQUEST['default'] != true) ) $_REQUEST['default'] = false;
1793
  $ct_value = !empty($startNum) ? $startNum-1 : 1;
1794
  endif;
1795
 
 
 
1796
  if ( $hideKey == true ) $hide = ' class="hideKey"';
1797
  if ( !empty($class) ) $class = ' class="' . $class . '"';
1798
  if ( !empty($style) ) $style = ' style="' . $style . '"';
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.2
7
- Stable tag: 1.8.9
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
@@ -105,6 +105,9 @@ See the default template and modify it.
105
 
106
  == Changelog ==
107
 
 
 
 
108
  = 1.8.9 =
109
  * Bugfix: saving multiple fields.
110
 
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.2
7
+ Stable tag: 1.9
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
105
 
106
  == Changelog ==
107
 
108
+ = 1.9 =
109
+ * Bugfix: inconsistency of `valueLabel` and `valueLabels`.
110
+
111
  = 1.8.9 =
112
  * Bugfix: saving multiple fields.
113