Custom Field Template - Version 1.4.1

Version Description

  • Bugfix: search functionality.
Download this release

Release Info

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

Code changes from version 1.4 to 1.4.1

Files changed (2) hide show
  1. custom-field-template.php +7 -4
  2. readme.txt +5 -2
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
8
  Author URI: http://wpgogo.com/
9
  */
10
 
@@ -2718,7 +2718,10 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
2718
  case 'checkbox':
2719
  if ( $rval['class'] ) $class = ' class="' . $rval['class'] . '"';
2720
  $values = $valueLabel = array();
2721
- $values = explode( '#', $rval['originalValue'] );
 
 
 
2722
  $valueLabel = explode( '#', $rval['valueLabel'] );
2723
  $default = explode( '#', $rval['default'] );
2724
  if ( is_numeric($rval['searchCode']) ) :
@@ -2991,7 +2994,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
2991
  case '=' :
2992
  case '<>' :
2993
  case '<=>':
2994
- $where .= " ROW(ID,1) IN (SELECT post_id,count(post_id) FROM " . $wpdb->postmeta . " WHERE (" . $wpdb->postmeta . ".meta_key = '" . $key . "' AND `" . $wpdb->postmeta . "`.meta_value " . $replace[$key][$key2]['operator'] . " " . trim($val3) . ") GROUP BY post_id) ";
2995
  break;
2996
  default :
2997
  $where .= " ROW(ID,1) IN (SELECT post_id,count(post_id) FROM " . $wpdb->postmeta . " WHERE (" . $wpdb->postmeta . ".meta_key = '" . $key . "' AND `" . $wpdb->postmeta . "`.meta_value LIKE '%" . trim($val3) . "%') GROUP BY post_id) ";
@@ -3042,7 +3045,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
3042
  $where .= " AND `".$wpdb->posts."`.post_status = 'publish' GROUP BY `".$wpdb->posts."`.ID";
3043
  endif;
3044
  //if ( $_REQUEST['s'] ) $where .= $original_where;
3045
-
3046
  return $where;
3047
  }
3048
 
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.1
8
  Author URI: http://wpgogo.com/
9
  */
10
 
2718
  case 'checkbox':
2719
  if ( $rval['class'] ) $class = ' class="' . $rval['class'] . '"';
2720
  $values = $valueLabel = array();
2721
+ if ( $rkey != 0 )
2722
+ $values = explode( '#', $rval['value'] );
2723
+ else
2724
+ $values = explode( '#', $rval['originalValue'] );
2725
  $valueLabel = explode( '#', $rval['valueLabel'] );
2726
  $default = explode( '#', $rval['default'] );
2727
  if ( is_numeric($rval['searchCode']) ) :
2994
  case '=' :
2995
  case '<>' :
2996
  case '<=>':
2997
+ $where .= " ROW(ID,1) IN (SELECT post_id,count(post_id) FROM " . $wpdb->postmeta . " WHERE (" . $wpdb->postmeta . ".meta_key = '" . $key . "' AND `" . $wpdb->postmeta . "`.meta_value " . $replace[$key][$key2]['operator'] . " '" . trim($val3) . "') GROUP BY post_id) ";
2998
  break;
2999
  default :
3000
  $where .= " ROW(ID,1) IN (SELECT post_id,count(post_id) FROM " . $wpdb->postmeta . " WHERE (" . $wpdb->postmeta . ".meta_key = '" . $key . "' AND `" . $wpdb->postmeta . "`.meta_value LIKE '%" . trim($val3) . "%') GROUP BY post_id) ";
3045
  $where .= " AND `".$wpdb->posts."`.post_status = 'publish' GROUP BY `".$wpdb->posts."`.ID";
3046
  endif;
3047
  //if ( $_REQUEST['s'] ) $where .= $original_where;
3048
+
3049
  return $where;
3050
  }
3051
 
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.4
7
- Stable tag: 1.4
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
@@ -98,9 +98,12 @@ See the default template and modify it.
98
 
99
  == Changelog ==
100
 
 
 
 
101
  = 1.4 =
102
  * `file` type in order to upload images. If you set `relation = true` with `type = file`, the image you upload will be related to the post you are editing. The image id will be saved as the meta value. You can use the `multiple = true` and `multipleButton = true`.
103
- * The group functionality. The attributes between `type = fieldset_open` and `type = fieldset_close` will be enclosed in the fieldset. The key name of the `fieldset_open` and `fieldset_close` must be same. You can use `multipleButton = true` with `type = fieldset_open`. You can also use the `legend = blah` attribute.
104
  * Revision of the interpretation of the template codes.
105
  * Bugfix: loading templates in switching catgories.
106
  * Hangarian and Uzbek.
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.4
7
+ Stable tag: 1.4.1
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
98
 
99
  == Changelog ==
100
 
101
+ = 1.4.1 =
102
+ * Bugfix: search functionality.
103
+
104
  = 1.4 =
105
  * `file` type in order to upload images. If you set `relation = true` with `type = file`, the image you upload will be related to the post you are editing. The image id will be saved as the meta value. You can use the `multiple = true` and `multipleButton = true`.
106
+ * The group functionality. The fields between `type = fieldset_open` and `type = fieldset_close` will be enclosed in the fieldset. The key name of the `fieldset_open` and `fieldset_close` must be same. You can use `multipleButton = true` with `type = fieldset_open`. You can also use the `legend = blah` attribute.
107
  * Revision of the interpretation of the template codes.
108
  * Bugfix: loading templates in switching catgories.
109
  * Hangarian and Uzbek.