Custom Field Template - Version 0.7.3

Version Description

Download this release

Release Info

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

Code changes from version 0.7.2 to 0.7.3

Files changed (4) hide show
  1. custom-field-template.php +21 -19
  2. readme.txt +7 -1
  3. screenshot-1.png +0 -0
  4. screenshot-2.png +0 -0
custom-field-template.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Custom Field Template
4
  Plugin URI: http://wordpressgogo.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: 0.7.2
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
@@ -352,7 +352,7 @@ hideKey = true<br />
352
  <th>mediaButton</th><td></td><td></td><td></td><td></td><td>mediaButton = true</td>
353
  </tr>
354
  <tr>
355
- <th>code</th><td></td><td></td><td>code = 0</td><td>code = 0</td><td></td>
356
  </tr>
357
  <tr>
358
  <th>level</th><td>level = 1</td><td>level = 3</td><td>level = 5</td><td>level = 7</td><td>level = 9</td>
@@ -901,7 +901,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
901
 
902
  $meta_value = stripcslashes(trim($_REQUEST[ "$name" ][$i]));
903
 
904
- if ( $options['custom_field_template_use_wpautop'] && $data[$i]['type'] == 'textarea' )
905
  $meta_value = wpautop($meta_value);
906
  if( isset( $meta_value ) && strlen( $meta_value ) ) {
907
  add_post_meta( $id, $title, $meta_value );
@@ -992,22 +992,24 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";
992
  $defaults[$dkey] = trim($dval);
993
 
994
  $tmp = $key;
995
- foreach($values as $value) {
996
- $Data[$title][$key]["type"] = "checkbox";
997
- $Data[$title][$key]["value"] = trim($value);
998
- if ( $tmp!=$key )
999
- $Data[$title][$key]["hideKey"] = true;
1000
- if ( is_array($defaults) )
1001
- if ( in_array(trim($value), $defaults) )
1002
- $Data[$title][$key]["checked"] = true;
1003
- if ( $val["level"] )
1004
- $Data[$title][$key]["level"] = $val["level"];
1005
- if ( $val["insertTag"] == true )
1006
- $Data[$title][$key]["insertTag"] = true;
1007
- if ( $val["output"] == true )
1008
- $Data[$title][$key]["output"] = true;
1009
- $key++;
1010
- }
 
 
1011
  }
1012
  }
1013
  }
4
  Plugin URI: http://wordpressgogo.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: 0.7.3
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
352
  <th>mediaButton</th><td></td><td></td><td></td><td></td><td>mediaButton = true</td>
353
  </tr>
354
  <tr>
355
+ <th>code</th><td></td><td>code = 0</td><td>code = 0</td><td>code = 0</td><td></td>
356
  </tr>
357
  <tr>
358
  <th>level</th><td>level = 1</td><td>level = 3</td><td>level = 5</td><td>level = 7</td><td>level = 9</td>
901
 
902
  $meta_value = stripcslashes(trim($_REQUEST[ "$name" ][$i]));
903
 
904
+ if ( $options['custom_field_template_use_wpautop'] && $data[$i]['type'] == 'textarea' && !empty($meta_value) )
905
  $meta_value = wpautop($meta_value);
906
  if( isset( $meta_value ) && strlen( $meta_value ) ) {
907
  add_post_meta( $id, $title, $meta_value );
992
  $defaults[$dkey] = trim($dval);
993
 
994
  $tmp = $key;
995
+ if ( is_array($values) ) :
996
+ foreach($values as $value) {
997
+ $Data[$title][$key]["type"] = "checkbox";
998
+ $Data[$title][$key]["value"] = trim($value);
999
+ if ( $tmp!=$key )
1000
+ $Data[$title][$key]["hideKey"] = true;
1001
+ if ( is_array($defaults) )
1002
+ if ( in_array(trim($value), $defaults) )
1003
+ $Data[$title][$key]["checked"] = true;
1004
+ if ( $val["level"] )
1005
+ $Data[$title][$key]["level"] = $val["level"];
1006
+ if ( $val["insertTag"] == true )
1007
+ $Data[$title][$key]["insertTag"] = true;
1008
+ if ( $val["output"] == true )
1009
+ $Data[$title][$key]["output"] = true;
1010
+ $key++;
1011
+ }
1012
+ endif;
1013
  }
1014
  }
1015
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wordpressgogo.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.7
7
- Stable tag: 0.7.2
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
@@ -28,6 +28,12 @@ The Custom Field Template plugin adds the default custom fields on the Write Pos
28
  * Adds [cft] Shortcode to display the custom field template. (only shows the attributes which have `output = true`)
29
  * Adds template instruction sections.
30
 
 
 
 
 
 
 
31
  == Installation ==
32
 
33
  1. Copy the `custom-field-template` directory into your `wp-content/plugins` directory
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.7
7
+ Stable tag: 0.7.3
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
28
  * Adds [cft] Shortcode to display the custom field template. (only shows the attributes which have `output = true`)
29
  * Adds template instruction sections.
30
 
31
+ Localization
32
+
33
+ * Spanish (es_ES) - Dario Ferrer
34
+
35
+ If you have translated into your language, please let me know.
36
+
37
  == Installation ==
38
 
39
  1. Copy the `custom-field-template` directory into your `wp-content/plugins` directory
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file