Custom Field Template - Version 2.4.1

Version Description

  • Bugfix: save button with file delete checkboxes.
Download this release

Release Info

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

Code changes from version 2.4 to 2.4.1

Files changed (2) hide show
  1. custom-field-template.php +4 -4
  2. readme.txt +4 -1
custom-field-template.php CHANGED
@@ -5,7 +5,7 @@ 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
  Author URI: http://wpgogo.com/
8
- Version: 2.4
9
  Text Domain: custom-field-template
10
  Domain Path: /
11
  */
@@ -2379,7 +2379,7 @@ jQuery(this).addClass("closed");
2379
  '<dt>'.$out_key.'</dt>' .
2380
  '<dd>';
2381
 
2382
- if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
2383
  $out_value .= '<p class="label">' . stripcslashes($label) . '</p>';
2384
  $out_value .= trim($before).'<input id="' . $name_id . $sid . '_' . $cftnum . '" name="' . $name . '['.$sid.'][]" type="file" size="' . $size . '"' . $class . $style . ' onchange="if (jQuery(this).val()) { jQuery(\'#cft_save_button\'+jQuery(this).parent().parent().parent().parent().attr(\'id\').replace(\'cft_\',\'\')).attr(\'disabled\', true); jQuery(\'#post-preview\').hide(); } else { jQuery(\'#cft_save_button\').attr(\'disabled\', false); jQuery(\'#post-preview\').show(); }" />'.trim($after).$picker;
2385
 
@@ -2660,7 +2660,7 @@ jQuery(this).addClass("closed");
2660
  if( $options == null)
2661
  return;
2662
 
2663
- if ( !$options['css'] ) {
2664
  $this->install_custom_field_template_css();
2665
  $options = $this->get_custom_field_template_data();
2666
  }
@@ -2828,7 +2828,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
2828
  $out .= 'if(!jQuery(\'#post\').valid()) return false;';
2829
  endif;
2830
  $out .= 'tinyMCE.triggerSave(); var fields = jQuery(\'#cft'.$suffix2.' :input\').fieldSerialize();';
2831
- $out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val(), data: fields, success: function() {jQuery(\'.delete_file_checkbox:checked\').each(function() {jQuery(this).parent().parent().remove();});}});';
2832
  $out .= '" class="button" style="vertical-align:middle;" />';
2833
  endif;
2834
  $out .= '</div>';
5
  Description: This plugin adds the default custom fields on the Write Post/Page.
6
  Author: Hiroaki Miyashita
7
  Author URI: http://wpgogo.com/
8
+ Version: 2.4.1
9
  Text Domain: custom-field-template
10
  Domain Path: /
11
  */
2379
  '<dt>'.$out_key.'</dt>' .
2380
  '<dd>';
2381
 
2382
+ if ( !empty($label) && empty($options['custom_field_template_replace_keys_by_labels']) )
2383
  $out_value .= '<p class="label">' . stripcslashes($label) . '</p>';
2384
  $out_value .= trim($before).'<input id="' . $name_id . $sid . '_' . $cftnum . '" name="' . $name . '['.$sid.'][]" type="file" size="' . $size . '"' . $class . $style . ' onchange="if (jQuery(this).val()) { jQuery(\'#cft_save_button\'+jQuery(this).parent().parent().parent().parent().attr(\'id\').replace(\'cft_\',\'\')).attr(\'disabled\', true); jQuery(\'#post-preview\').hide(); } else { jQuery(\'#cft_save_button\').attr(\'disabled\', false); jQuery(\'#post-preview\').show(); }" />'.trim($after).$picker;
2385
 
2660
  if( $options == null)
2661
  return;
2662
 
2663
+ if ( empty($options['css']) ) {
2664
  $this->install_custom_field_template_css();
2665
  $options = $this->get_custom_field_template_data();
2666
  }
2828
  $out .= 'if(!jQuery(\'#post\').valid()) return false;';
2829
  endif;
2830
  $out .= 'tinyMCE.triggerSave(); var fields = jQuery(\'#cft'.$suffix2.' :input\').fieldSerialize();';
2831
+ $out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val(), data: fields, success: function() {jQuery(\'.delete_file_checkbox:checked\').each(function() {jQuery(this).parent().parent().next().val(\'\');jQuery(this).parent().parent().remove();});}});';
2832
  $out .= '" class="button" style="vertical-align:middle;" />';
2833
  endif;
2834
  $out .= '</div>';
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wpgogo.com/development/custom-field-template.html
4
  Tags: custom field, custom fields, custom, fields, field, template, meta, custom field template, custom post type
5
  Requires at least: 2.1
6
  Tested up to: 4.9.6
7
- Stable tag: 2.4
8
  License: GPLv2 or later
9
 
10
  The Custom Field Template plugin extends the functionality of custom fields.
@@ -114,6 +114,9 @@ See the default template and modify it.
114
 
115
  == Changelog ==
116
 
 
 
 
117
  = 2.4 =
118
  * Bugfix: cftsearch.
119
 
4
  Tags: custom field, custom fields, custom, fields, field, template, meta, custom field template, custom post type
5
  Requires at least: 2.1
6
  Tested up to: 4.9.6
7
+ Stable tag: 2.4.1
8
  License: GPLv2 or later
9
 
10
  The Custom Field Template plugin extends the functionality of custom fields.
114
 
115
  == Changelog ==
116
 
117
+ = 2.4.1 =
118
+ * Bugfix: save button with file delete checkboxes.
119
+
120
  = 2.4 =
121
  * Bugfix: cftsearch.
122