Custom Field Template - Version 1.6.8

Version Description

  • Bugfix: prepared statement of cft search sqls.
Download this release

Release Info

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

Code changes from version 1.6.7 to 1.6.8

Files changed (2) hide show
  1. custom-field-template.php +4 -4
  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.6.7
8
  Author URI: http://wpgogo.com/
9
  */
10
 
@@ -3359,14 +3359,14 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
3359
 
3360
  if ( $_REQUEST['orderby'] ) :
3361
  if ( in_array($_REQUEST['orderby'], array('post_author', 'post_date', 'post_title', 'post_modified', 'menu_order', 'post_parent', 'ID')) ):
3362
- $sql = $wpdb->prepare("`".$wpdb->posts."`.%s %s", $_REQUEST['orderby'], $_REQUEST['order']);
3363
  elseif ( $_REQUEST['orderby']=='rand' ):
3364
  $sql = "RAND()";
3365
  else:
3366
  if ( in_array($_REQUEST['cast'], array('binary', 'char', 'date', 'datetime', 'signed', 'time', 'unsigned')) ) :
3367
- $sql = $wpdb->prepare(" CAST(meta.meta_value AS %s) %s", $_REQUEST['cast'], $_REQUEST['order']);
3368
  else :
3369
- $sql = $wpdb->prepare(" meta.meta_value %s", $_REQUEST['order']);
3370
  endif;
3371
  endif;
3372
  return $sql;
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.6.8
8
  Author URI: http://wpgogo.com/
9
  */
10
 
3359
 
3360
  if ( $_REQUEST['orderby'] ) :
3361
  if ( in_array($_REQUEST['orderby'], array('post_author', 'post_date', 'post_title', 'post_modified', 'menu_order', 'post_parent', 'ID')) ):
3362
+ $sql = "`".$wpdb->posts."`.".$_REQUEST['orderby']." ".$_REQUEST['order'];
3363
  elseif ( $_REQUEST['orderby']=='rand' ):
3364
  $sql = "RAND()";
3365
  else:
3366
  if ( in_array($_REQUEST['cast'], array('binary', 'char', 'date', 'datetime', 'signed', 'time', 'unsigned')) ) :
3367
+ $sql = " CAST(meta.meta_value AS ".$_REQUEST['cast'].") ".$_REQUEST['order'];
3368
  else :
3369
+ $sql = " meta.meta_value ".$_REQUEST['order'];
3370
  endif;
3371
  endif;
3372
  return $sql;
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.0
7
- Stable tag: 1.6.7
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
@@ -102,6 +102,9 @@ See the default template and modify it.
102
 
103
  == Changelog ==
104
 
 
 
 
105
  = 1.6.7 =
106
  * Bugfix: Code error. Do not use 1.6.6.
107
 
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.0
7
+ Stable tag: 1.6.8
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
102
 
103
  == Changelog ==
104
 
105
+ = 1.6.8 =
106
+ * Bugfix: prepared statement of cft search sqls.
107
+
108
  = 1.6.7 =
109
  * Bugfix: Code error. Do not use 1.6.6.
110